annotate src/aci2/aci/cmh_simr.c @ 702:9394305d4ff5 default tip

etm_audio.c: fix off-by-one error in auw of FIR coefficients This fix was already made in FC Tourmaline a while back, but it is also the kind of bugfix that deserves to be backported to Magnetite and Selenite as well.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 31 Oct 2022 00:14:44 +0000
parents 93999a60b835
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 +-----------------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 | Project : GSM-PS (6147)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 | Modul : CMH_SIMR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 +-----------------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 | Copyright 2002 Texas Instruments Berlin, AG
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 | All rights reserved.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 | This file is confidential and a trade secret of Texas
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 | Instruments Berlin, AG
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 | The receipt of or possession of this file does not convey
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 | any rights to reproduce or disclose its contents or to
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 | manufacture, use, or sell anything it may describe, in
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 | whole, or in part, without the specific written consent of
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 | Texas Instruments Berlin, AG.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 +-----------------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 | Purpose : This module defines the functions which are responsible
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 | for the responses of the protocol stack adapter for
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 | the subscriber identity module.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 +-----------------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #ifndef CMH_SIMR_C
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 #define CMH_SIMR_C
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #include "aci_all.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 /*==== INCLUDES ===================================================*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #include "aci_mem.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #include "aci_cmh.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #include "ati_cmd.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #include "aci_cmd.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #include "pcm.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #ifdef FAX_AND_DATA
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #include "aci_fd.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #endif /* of #ifdef FAX_AND_DATA */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #ifndef _SIMULATION_
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 #include "ffs/ffs.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 #include "ffs_coat.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 #ifdef DTI
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 #include "dti.h" /* functionality of the dti library */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #include "dti_conn_mng.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 #include "dti_cntrl_mng.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 #endif /* DTI */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #include "phb.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 #include "ksd.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 #include "aci.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 #include "psa.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 #include "psa_sim.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 #include "psa_cc.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 #include "psa_sat.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 #include "psa_mm.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 #include "cmh.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 #include "cmh_sim.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 #include "cmh_mm.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 #include "cmh_phb.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 #include "aci_ext_pers.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 #include "aci_slock.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67 #ifdef SIM_PERS
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 #include "general.h" // included for compilation error UNIT8 in sec_drv.h
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 #include "sec_drv.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 #ifdef GPRS
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 #include "gaci.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 #include "gaci_cmh.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 #include "psa_gmm.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 #include "cmh_gmm.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 #include "p_mmcc.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 #include "m_cc.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 #include "aoc.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 #ifdef DTI
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 #include "wap_aci.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 #include "psa_tcpip.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 #include "psa_l2r.h"
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 #ifdef SIM_PERS
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 EXTERN T_ACI_SIM_CONFIG aci_slock_sim_config; /* SIM configuration, initialised by a T_SIM_MMI_INSERT_IND */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 EXTERN T_SEC_DRV_CONFIGURATION *cfg_data ;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 /*==== CONSTANTS ==================================================*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 /*==== TYPES ======================================================*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 /*==== EXPORT =====================================================*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 /*==== VARIABLES ==================================================*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 /*==== FUNCTIONS ==================================================*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 | ROUTINE : cmhSIM_SIMSync |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 PURPOSE : SIM data synchronized
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 GLOBAL void cmhSIM_SIMSync ( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 TRACE_FUNCTION ("cmhSIM_SIMSync()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 /* process event */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 switch( simEntStat.curCmd )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 case( AT_CMD_CFUN ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 if (mmEntStat.curCmd NEQ AT_CMD_CFUN) /* Has MM already deregistered? */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 ( AT_CMD_CFUN );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 /* log result */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 cmh_logRslt ( simEntStat.entOwn, RAT_OK, AT_CMD_CFUN, -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 /*lint -fallthrough*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 case( AT_CMD_COPS ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 case( AT_CMD_P_COPS ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 | ROUTINE : clck_fdn_accepted() |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 PURPOSE : PIN2 status allows CLCK changing the status concerning FDN.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 LOCAL void clck_fdn_accepted ( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 switch( simShrdPrm.setPrm[simEntStat.entOwn].actProc )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 case( SIM_FDN_ENABLE ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 if( simShrdPrm.crdFun EQ SIM_ADN_ENABLED )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 simShrdPrm.crdFun = SIM_FDN_ENABLED;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 if( simShrdPrm.crdFun EQ SIM_ADN_BDN_ENABLED )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 simShrdPrm.crdFun = SIM_FDN_BDN_ENABLED;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 pb_switch_adn_fdn( FDN_ENABLE, simShrdPrm.classFDN ); /* inform PHB */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 case( SIM_FDN_DISABLE ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 if( simShrdPrm.crdFun EQ SIM_FDN_ENABLED )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 simShrdPrm.crdFun = SIM_ADN_ENABLED;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 if( simShrdPrm.crdFun EQ SIM_FDN_BDN_ENABLED )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 simShrdPrm.crdFun = SIM_ADN_BDN_ENABLED;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 pb_switch_adn_fdn( FDN_DISABLE, simShrdPrm.classFDN ); /* inform PHB */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 | ROUTINE : cmhsim_simactivated_clck |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 PURPOSE : SIM activated after AT+CLCK
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 LOCAL void cmhsim_simactivated_clck( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 T_ACI_CME_ERR err = CME_ERR_Unknown;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 T_SIM_SET_PRM *sim_set_prm;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 TRACE_FUNCTION ("cmhsim_simactivated_clck()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 sim_set_prm = &simShrdPrm.setPrm[simEntStat.entOwn];
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 switch( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 clck_fdn_accepted();
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 ( AT_CMD_CLCK );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 cmh_logRslt ( simEntStat.entOwn, RAT_OK, AT_CMD_CLCK, -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 case( SIM_CAUSE_PIN2_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 TRACE_EVENT_P1("simShrdPrm.pn2Stat: %d", simShrdPrm.pn2Stat);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 if ( simShrdPrm.pn2Stat EQ PS_PIN2 )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 if ( ( simShrdPrm.setPrm[simEntStat.entOwn].curPIN[0] NEQ 0x00 ) AND
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 ( simShrdPrm.setPrm[simEntStat.entOwn].curPIN[0] NEQ NOT_PRESENT_CHAR ) )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 /* if PIN2 is required and a pin is given, then check pin with PIN2 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 simEntStat.curCmd = AT_CMD_CLCK; /* further processing */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 simShrdPrm.setPrm[simEntStat.entOwn].PINType = PHASE_2_PIN_2;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 psaSIM_VerifyPIN(); /* verify PIN */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 /* if PIN2 is required and no pin is given, then send cme_err with PIN2
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 required message code */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 if ( simShrdPrm.PINStat EQ PS_RDY )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 simShrdPrm.PINStat = PS_PIN2;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 err = CME_ERR_SimPin2Req;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 err = CME_ERR_WrongPasswd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 /*case( SIM_CAUSE_PIN1_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 case( SIM_CAUSE_PUK1_EXPECT ):*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 /* Should be CME_ERR_SimPuk2Req, and it is done
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 in the default case
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 case( SIM_CAUSE_PIN2_BLOCKED):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 case( SIM_CAUSE_PUK2_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251 err = CME_ERR_WrongPasswd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 break;*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 err = cmhSIM_GetCmeFromSim( simShrdPrm.rslt );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260 ( AT_CMD_CLCK, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261 cmh_logRslt ( simEntStat.entOwn, RAT_CME, AT_CMD_CLCK,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 -1, -1, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 | ROUTINE : cmhsim_simactivated_start |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271 PURPOSE : SIM activated after AT+CFUN, +CPIN, +CIMI and %NRG
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 LOCAL void simactivated_cpinresult( T_ACI_CPIN_RSLT cpin_result )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275 R_AT( RAT_CPIN, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 ( cpin_result );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 ( AT_CMD_CPIN );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 cmh_logRslt ( simEntStat.entOwn, RAT_OK, AT_CMD_CPIN,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 LOCAL void simactivated_errorresult( T_ACI_CME_ERR error_result, UBYTE cmdBuf )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 ( cmdBuf, error_result );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 if( cmdBuf NEQ AT_CMD_CIMI )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291 -1, -1, error_result );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 LOCAL void cmhsim_simactivated_start( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 UBYTE cmdBuf = simEntStat.curCmd; /* buffers current command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 TRACE_FUNCTION ("cmhsim_simactivated_start()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 switch( simShrdPrm.SIMStat )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 case( SS_INV ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306 simactivated_errorresult( CME_ERR_SimWrong, cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 case( SS_URCHB ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 simactivated_errorresult( CME_ERR_SimNotIns, cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 case( NO_VLD_SS ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314 simactivated_errorresult( CME_ERR_NotPresent, cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 case( SS_OK ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318 switch( simShrdPrm.PINStat )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 case( PS_PIN1 ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 if( cmdBuf EQ AT_CMD_CPIN )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323 simactivated_cpinresult( CPIN_RSLT_SimPinReq );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 simactivated_errorresult( CME_ERR_SimPinReq, cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 case( PS_PIN2 ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332 if( cmdBuf EQ AT_CMD_CPIN )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334 simactivated_cpinresult( CPIN_RSLT_SimPin2Req );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 simactivated_errorresult( CME_ERR_SimPin2Req, cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 case( PS_RDY ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 /* wait for SIM insert indication to complete command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 simEntStat.curCmd = cmdBuf;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349 case( SS_BLKD ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
351 switch( simShrdPrm.PINStat )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
352 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353 case( PS_PUK1 ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354 if( cmdBuf EQ AT_CMD_CPIN )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356 simactivated_cpinresult( CPIN_RSLT_SimPukReq );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360 simactivated_errorresult( CME_ERR_SimPukReq, cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
362 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
363
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
364 case( PS_PUK2 ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365 if( cmdBuf EQ AT_CMD_CPIN )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367 simactivated_cpinresult( CPIN_RSLT_SimPuk2Req );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 simactivated_errorresult( CME_ERR_SimPuk2Req, cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
375 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 | ROUTINE : cmhSIM_SIMActivated |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
384 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386 PURPOSE : SIM activated
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
389
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390 GLOBAL void cmhSIM_SIMActivated ( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392 T_ACI_CMD_SRC idx;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
393
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
394 TRACE_FUNCTION ("cmhSIM_SIMActivated()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
395
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
396 /* check for command context */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
397 switch( simEntStat.curCmd )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
398 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
399 case( AT_CMD_CFUN ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
400 case( AT_CMD_CPIN ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
401 case( AT_CMD_CIMI ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402 case( AT_CMD_NRG ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
403 case( AT_CMD_SIMRST):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
404 /* process event for +CFUN, +CPIN, +CIMI and for %NRG command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
405 cmhsim_simactivated_start( );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 case( AT_CMD_CLCK ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
409 /* process event for +CLCK command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410 cmhsim_simactivated_clck( );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
413 case( AT_CMD_NONE ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
414 /* process event spontaneous insertion */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 if (simShrdPrm.rslt EQ SIM_NO_ERROR)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
417 ; /* do nothing right now since the %SIMINS: -1 must be
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418 syncronized with SIM_MMI_INSERT_IND which will come later! */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
420 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
421 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
422 for( idx = 0; idx < CMD_SRC_MAX; idx++ )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
423 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
424 R_AT( RAT_SIMINS, idx )(cmhSIM_GetCmeFromSim (simShrdPrm.rslt));
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
425 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
427 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
434 | ROUTINE : cmhSIM_SIMInserted |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
435 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
436
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
437 PURPOSE : SIM inserted
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
440
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
441 GLOBAL void cmhSIM_SIMInserted ( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443 UBYTE cmdBuf; /* buffers current command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
444 CHAR imsiBuf[MAX_IMSI_LEN+1]; /* buffer IMSI representation +1 for '\0'*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
445 T_ACI_CME_ERR err_code = CME_ERR_NotPresent; /* code holding the correct error code calculated */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
446 BOOL return_rat_ok = 1; /* return ok? */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
447
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
448 TRACE_FUNCTION ("cmhSIM_SIMInserted()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
449
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450 /* Check if the SIM is functional and the IMSI value is valid*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451 if ( simShrdPrm.crdFun EQ SIM_NO_OPERATION OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452 simShrdPrm.imsi.c_field EQ 0 )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
453 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
454 simShrdPrm.SIMStat = SS_INV;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
455 err_code = CME_ERR_SimWrong;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
456 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
457
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
458 switch( simEntStat.curCmd )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
459 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
460 case( AT_CMD_CFUN ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
461 case( AT_CMD_CPIN ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
462 case( AT_CMD_PVRF ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
463 case( AT_CMD_SIMRST):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464 case( KSD_CMD_UBLK):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 * process event for +CFUN, +CPIN, %PVRF commands and for the
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468 SIM reset condition
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
469 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
470 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
471
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
472 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
473 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
474 #ifdef SIM_PERS
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
475 if((aci_slock_sim_config.sim_type EQ SIM_TYPEAPPROVAL) AND AciSLockShrd.blocked)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
476 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
477 simShrdPrm.SIMStat = SS_INV;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478 err_code = CME_ERR_SimWrong;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
480 if(cfg_data EQ NULL)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
481 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
482 simShrdPrm.SIMStat = SS_INV;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
483 err_code = CME_ERR_Unknown;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
484 R_AT( RAT_CME, simEntStat.entOwn ) ( cmdBuf, err_code );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
485 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf, -1, -1, err_code );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486 simShrdPrm.PINQuery = 0;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
488 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
491 if( err_code EQ CME_ERR_SimWrong )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
492 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
493 R_AT( RAT_CME, simEntStat.entOwn ) ( cmdBuf, err_code );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
494 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf, -1, -1, err_code );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
495 simShrdPrm.PINQuery = 0;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
496 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
499 #ifdef SIM_PERS
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
500 /* check for personalisation locking. If SIM was detected as not correct, do signal AT_CPIN */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
501
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
502 if ( AciSLockShrd.blocked)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
503 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
504 /* @GBR: Alternativly CME_ERR_SimWrong might be returned, but this way is telling the MMI mor specific, what went wrong. */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
505 aci_set_cme_error_code(AciSLockShrd.current_lock,&err_code);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
507 return_rat_ok = 0;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
508 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
509 ( cmdBuf, err_code );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
510 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf, -1, -1, err_code );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
511 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
512
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
513 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
514 if ( (cmdBuf EQ AT_CMD_CPIN) AND (simShrdPrm.PINQuery EQ 1) ) /* Case when PIN is disabled and CFUN=0 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
515 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
516 R_AT( RAT_CPIN, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
517 ( CPIN_RSLT_SimReady );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
518 simShrdPrm.PINQuery = 0;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
519 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
520
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
521 #if defined (GPRS) AND defined (DTI)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
522 gprs_sim_inserted();
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
523 #endif /* GPRS */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
524
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
525 if (return_rat_ok EQ 1) /* @gbr: only send ok, if everhing went okay. The +CFUN might not be ready here, so don't send something! */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
526 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
527
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
528 R_AT( RAT_OK, simEntStat.entOwn ) ( cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
529 cmh_logRslt ( simEntStat.entOwn, RAT_OK, cmdBuf, -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
530 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
531 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
532
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
533 case( AT_CMD_CIMI ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
534 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
535 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
536 * process event for +CIMI command
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
537 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
538 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
539
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
540
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
541 if( err_code EQ CME_ERR_SimWrong )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
542 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
543 R_AT( RAT_CME, simEntStat.entOwn ) ( AT_CMD_CIMI, err_code );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
544 cmh_logRslt ( simEntStat.entOwn, RAT_CME, AT_CMD_CIMI, -1, -1, err_code );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
545 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
546 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
547
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
548 R_AT( RAT_CIMI, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
549 ( psaSIM_cnvrtIMSI2ASCII( imsiBuf ));
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
550
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
551 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
552
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
553 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
554 ( AT_CMD_CIMI );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
555 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
556
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
557 case( AT_CMD_NRG ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
558 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
559 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
560 * process event for %NRG
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
561 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
562 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
563 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
564 if( err_code EQ CME_ERR_SimWrong )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
565 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
566 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
567 mmEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
568 R_AT( RAT_CME, simEntStat.entOwn ) ( cmdBuf, err_code );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
569 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf, -1, -1, err_code );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
570 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
571 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
572
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
573 switch( cmhPrm[simShrdPrm.owner].mmCmdPrm.NRGregMode )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
574 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
575 case( NRG_RGMD_Auto ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
576
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
577 mmShrdPrm.regMode = MODE_AUTO;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
578
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580 mmEntStat.curCmd = AT_CMD_NRG;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
581 mmEntStat.entOwn = mmShrdPrm.owner = simShrdPrm.owner;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
582
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
583 #if defined (GPRS) AND defined (DTI)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
584 (void)psaG_MM_CMD_REG (); /* register to network */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
585 #else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586 (void)psaMM_Registrate (); /* register to network */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
587 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
588
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
589 cmhMM_Ntfy_NtwRegistrationStatus(CREG_STAT_Search);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
590 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
591
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
592 case( NRG_RGMD_Manual ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
593
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
594 mmShrdPrm.regMode = MODE_MAN;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
595
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
596 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
597 mmEntStat.curCmd = AT_CMD_NRG;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
598 mmEntStat.entOwn = mmShrdPrm.owner = simShrdPrm.owner;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
599
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
600 #if defined (GPRS) && defined (DTI)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
601 psaG_MM_CMD_NET_SEL ( ); /* register to network */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
602 #else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
603 psaMM_NetSel (); /* register to network */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
604 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
605
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
606 cmhMM_Ntfy_NtwRegistrationStatus(CREG_STAT_Search);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
607 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
608 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
609 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
610
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
611 case( AT_CMD_NONE ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
612 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
613 T_ACI_CMD_SRC idx;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
614 /* process event spontaneous insertion */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
615 for( idx = 0; idx < CMD_SRC_MAX; idx++ )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
617 R_AT( RAT_SIMINS, idx )( err_code );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
618 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
619 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
620 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
621
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
622 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
623 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
624
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
625 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
626 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
627 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
628 | ROUTINE : cmhSIM_SIMRemoved |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
629 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
630
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
631 PURPOSE : SIM removed
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
632
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
633 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
634
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
635 GLOBAL void cmhSIM_SIMRemoved ( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
636 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
637 UBYTE cmdBuf; /* buffers command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
638 T_ACI_CMD_SRC idx;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
639 T_ACI_CME_ERR cme_error; /* CME error code */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
640 T_ACI_SIMREM_TYPE srt; /* type of SIM remove */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
641
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
642 TRACE_FUNCTION ("cmhSIM_SIMRemoved()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
643
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
644 if (simEntStat.curCmd NEQ AT_CMD_NONE)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
645 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
646 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
647 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
648
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649 if (simShrdPrm.rslt EQ SIM_NO_ERROR)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
650 cme_error = CME_ERR_SimBusy;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
651 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
652 cme_error = cmhSIM_GetCmeFromSim (simShrdPrm.rslt);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
655 ( cmdBuf, cme_error );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
656 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
657 -1, -1, cme_error );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
658 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
659 EfPLMNselStat = EF_STAT_UNKNWN;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
660 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
661 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662 * send unsolicited result
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
663 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
664 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
665 TRACE_EVENT_P1("Result of SIM remove indication: %x", simShrdPrm.rslt);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
666 switch (simShrdPrm.rslt)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
667 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
668 case SIM_NO_ERROR:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
669 /* In this case the AT command state is set to SIM RESET */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
670 /* NO, don't do this!
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
671 This line would prevent a %SIMIND: 11 and instead leads to
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
672 "+CME ERROR: SIM PIN required" without any command context which is wrong */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
673 /* simEntStat.curCmd = AT_CMD_SIMRST; */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
674 srt = SIMREM_RESET;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
675 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
676 case SIM_CAUSE_DRV_TEMPFAIL:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
677 srt = SIMREM_RETRY;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
678 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
679 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
680 srt = SIMREM_FAILURE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
681 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
682 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
683
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
684 for( idx = 0; idx < CMD_SRC_MAX; idx++ )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
685 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
686 R_AT( RAT_SIMREM, idx )(srt);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
687 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
688 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
689
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
690 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
691 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
692 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
693 | ROUTINE : cmhSIM_PINVerified |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
694 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
695
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
696 PURPOSE : SIM verified
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
697
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
698 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
699 LOCAL void pin_verified_clck (USHORT sim_result)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
700 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
701 TRACE_FUNCTION ("pin_verified_clck()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
702
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
703 switch(sim_result)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
704 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
705 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
706 /* now do it ! */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
707
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
708 /* Check if we want to do FDN Lock or ALS Lock */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
709 switch (simShrdPrm.setPrm[simShrdPrm.owner].actProc)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
710 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
711 case SIM_FDN_ENABLE:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
712 case SIM_FDN_DISABLE:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
713 /* FDN Lock */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
714 if( psaSIM_ActivateSIM() < 0 ) /* activate SIM card */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
715 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
716 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
717
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
718 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
719 ( AT_CMD_CLCK, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
720 cmh_logRslt ( simEntStat.entOwn, RAT_CME, AT_CMD_CLCK,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
721 -1, -1, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
722 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
723 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
724
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
725 case SIM_ALS_LOCK:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
726 case SIM_ALS_UNLOCK:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
727 /* ALS Lock to PIN2 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
728 if (simShrdPrm.setPrm[simShrdPrm.owner].actProc EQ SIM_ALS_LOCK)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
729 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
730 ALSlock = cmhPrm[simShrdPrm.owner].ccCmdPrm.ALSmode;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
731 /* pull all sources to the current ALSmode, otherwise a lock won't make sense */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
732 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
733 int i;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
734 for (i=0; i<OWN_MAX; i++)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
735 cmhPrm[i].ccCmdPrm.ALSmode = ALSlock;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
736 /* and lock them all */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
737 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
738 #ifndef _SIMULATION_
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
739 /* write Lock to FFS */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
740 FFS_fwrite("/gsm/com/ALSlock", &ALSlock, sizeof(ALSlock));
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
741 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
742 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
743 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
744 /* unlock ALS */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
745 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
746 ALSlock = ALS_MOD_NOTPRESENT;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
747 #ifndef _SIMULATION_
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
748 /* remove lock from FFS */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
749 FFS_remove("/gsm/com/ALSlock");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
750 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
751 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
752
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
753 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
754
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
755 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
756 ( AT_CMD_CLCK );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
757 cmh_logRslt ( simEntStat.entOwn, RAT_OK, AT_CMD_CLCK, -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
758 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
759
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
760 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
761 break; /* SIM_NO_ERROR */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
762
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
763 case( SIM_CAUSE_PIN1_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
764 case( SIM_CAUSE_PIN2_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
765 case( SIM_CAUSE_PIN1_BLOCKED ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
766 case( SIM_CAUSE_PUK1_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
767 case( SIM_CAUSE_PIN2_BLOCKED ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
768 case( SIM_CAUSE_PUK2_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
769 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
770
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
771 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
772 ( AT_CMD_CLCK, cmhSIM_GetCmeFromSim ( sim_result ) /*CME_ERR_WrongPasswd*/ );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
773 cmh_logRslt ( simEntStat.entOwn, RAT_CME, AT_CMD_CLCK,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
774 -1, -1, CME_ERR_WrongPasswd );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
775 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
776
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
777 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
778 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
779 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
780 ( AT_CMD_CLCK, CME_ERR_SimFail );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
781 cmh_logRslt ( simEntStat.entOwn, RAT_CME, AT_CMD_CLCK,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
782 -1, -1, CME_ERR_SimFail );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
783 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
784 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
785 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
786
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
787 GLOBAL void cmhSIM_PINVerified ( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
788 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
789 UBYTE cmdBuf; /* buffers command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
790 T_PHB_CMD_PRM * pPHBCmdPrm; /* points to PHB command parameters */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
791
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
792 TRACE_FUNCTION ("cmhSIM_PINVerified()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
793
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
794 pPHBCmdPrm = &cmhPrm[simShrdPrm.owner].phbCmdPrm;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
795
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
796 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
797 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
798 * check for command context
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
799 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
800 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
801 switch( simEntStat.curCmd )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
802 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
803 case( AT_CMD_CLCK ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
804 /* process event for +CLCK command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
805 pin_verified_clck( simShrdPrm.rslt );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
806 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
807
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
808 case( AT_CMD_CPIN ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
809 case( AT_CMD_PVRF ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
810 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
811 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
812 * process event for +CPIN and %PVRF command
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
813 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
814 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
815 switch( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
816 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
817 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
818
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
819 /* if verified PIN was PIN 2 or PIN 1 was already entered */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
820 if( simShrdPrm.setPrm[simEntStat.entOwn].PINType EQ
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
821 PHASE_2_PIN_2 OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
822 simShrdPrm.crdPhs NEQ 0xFF )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
823 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
824 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
825 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
826
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
827 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
828 ( cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
829 cmh_logRslt ( simEntStat.entOwn, RAT_OK, cmdBuf, -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
830 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
831 /* otherwise wait for SIM insert indication to complete command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
832 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
833
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
834 case( SIM_CAUSE_PIN1_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
835 case( SIM_CAUSE_PIN2_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
836 case( SIM_CAUSE_PUK1_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
837 case( SIM_CAUSE_PUK2_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
838 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
839 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
840
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
841 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
842 ( cmdBuf, CME_ERR_WrongPasswd );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
843 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
844 -1, -1, CME_ERR_WrongPasswd );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
845 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
846 case( SIM_CAUSE_PIN1_BLOCKED):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
847 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
848 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
849
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
850 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
851 ( cmdBuf, CME_ERR_SimPukReq );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
852 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
853 -1, -1, CME_ERR_SimPukReq );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
854 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
855 case( SIM_CAUSE_PIN2_BLOCKED):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
856 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
857 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
858
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
859 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
860 ( cmdBuf, CME_ERR_SimPuk2Req );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
861 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
862 -1, -1, CME_ERR_SimPuk2Req );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
863 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
864 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
865 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
866 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
867 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
868 ( cmdBuf, CME_ERR_SimFail );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
869 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
870 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
871 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
872
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
873 case( AT_CMD_CAMM ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
874 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
875 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
876 * process event for +CAMM command
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
877 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
878 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
879 switch( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
880 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
881 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
882 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
883 * Try it again
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
884 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
885 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
886 aoc_update_acmmax (SECOND_UPDATE, 0L);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
887 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
888
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
889 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
890 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
891 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
892 ( AT_CMD_CAMM, CME_ERR_WrongPasswd );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
893 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
894 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
895 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
896
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
897 case( AT_CMD_CPUC ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
898 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
899 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
900 * process event for +CPUC command
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
901 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
902 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
903 switch( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
904 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
905 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
906 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
907 * Try it again
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
908 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
909 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
910 aoc_update_puct (SECOND_UPDATE, 0L);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
911 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
912
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
913 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
914 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
915 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
916 ( AT_CMD_CPUC, CME_ERR_WrongPasswd );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
917 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
918 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
919 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
920
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
921 case( AT_CMD_CACM ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
922 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
923 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
924 * process event for +CACM command
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
925 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
926 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
927 switch( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
928 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
929 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
930 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
931 * Try it again
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
932 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
933 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
934 aoc_update_acm (SECOND_UPDATE, 0L);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
935 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
936
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
937 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
938 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
939 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
940 ( AT_CMD_CACM, CME_ERR_WrongPasswd );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
941 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
942 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
943 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
944
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
945 /*----------------------------------------------------------*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
946 * The below code is for CPBW SIM verification response *
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
947 *----------------------------------------------------------*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
948
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
949 case( AT_CMD_CPBS ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
950 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
951 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
952 * process event for +CPBW command
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
953 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
954 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
955 switch( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
956 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
957 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
958
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
959 /*-----------------------------------------------*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
960 * if verified PIN was PIN 2 was already entered *
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
961 *-----------------------------------------------*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
962
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
963 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
964 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
965
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
966 pPHBCmdPrm->cmhStor = pPHBCmdPrm->temp_cmhStor;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
967 pPHBCmdPrm->phbStor = pPHBCmdPrm->temp_phbStor;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
968
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
969 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
970 ( cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
971
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
972 cmh_logRslt ( simEntStat.entOwn, RAT_OK, cmdBuf, -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
973
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
974 /*---------------------------------------------------------------*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
975 * otherwise wait for SIM insert indication to complete command *
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
976 *---------------------------------------------------------------*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
977
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
978 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
979
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
980 case( SIM_CAUSE_PUK2_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
981 case( SIM_CAUSE_PIN2_BLOCKED):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
982 case( SIM_CAUSE_PIN2_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
983
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
984 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
985 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
986
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
987 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
988 ( cmdBuf, CME_ERR_WrongPasswd );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
989 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
990 -1, -1, CME_ERR_WrongPasswd );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
991 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
992
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
993 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
994 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
995 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
996 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
997 ( cmdBuf, CME_ERR_SimFail );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
998 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
999 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1000 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1001
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1002 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1003
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1004 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1005 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1006 ( AT_CMD_CPIN, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1007 cmh_logRslt ( simEntStat.entOwn, RAT_CME, AT_CMD_CPIN,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1008 -1, -1, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1009 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1010 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1011 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1012
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1013 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1014 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1015 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1016 | ROUTINE : cmhSIM_PINChanged |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1017 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1018
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1019 PURPOSE : SIM changed
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1020
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1021 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1022
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1023 GLOBAL void cmhSIM_PINChanged ( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1024 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1025 T_ACI_CME_ERR err;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1026 UBYTE cmdBuf;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1027
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1028 TRACE_FUNCTION ("cmhSIM_PINChanged()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1029
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1030 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1031 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1032 * check for command context
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1033 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1034 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1035 switch( simEntStat.curCmd )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1036 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1037 case( AT_CMD_CPWD ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1038 /*lint -e{408} */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1039 case( KSD_CMD_PWD ): /* KSD_CMD_* extends AT_CMD_* */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1040 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1041 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1042 * process event for +CPWD and KSD PWD command
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1043 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1044 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1045 switch( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1046 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1047 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1048
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1049 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1050 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1051
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1052 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1053 ( cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1054 cmh_logRslt ( simEntStat.entOwn, RAT_OK, cmdBuf, -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1055 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1056
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1057 /* why not use a meaningful CME error code?
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1058 case( SIM_CAUSE_PUK1_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1059 case( SIM_CAUSE_PUK2_EXPECT ): */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1060 case( SIM_CAUSE_PIN1_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1061 case( SIM_CAUSE_PIN2_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1062 err = CME_ERR_WrongPasswd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1063 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1064
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1065 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1066 err = cmhSIM_GetCmeFromSim ( simShrdPrm.rslt );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1067 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1068 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1069
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1070 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1071 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1072
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1073 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1074 ( cmdBuf, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1075 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1076 -1, -1, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1077 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1078 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1079 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1080
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1081 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1082 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1083 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1084 | ROUTINE : cmhSIM_PINEnabled |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1085 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1086
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1087 PURPOSE : SIM enabled
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1088
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1089 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1090
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1091 GLOBAL void cmhSIM_PINEnabled ( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1092 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1093 T_ACI_CME_ERR err;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1094
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1095 TRACE_FUNCTION ("cmhSIM_PINEnabled()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1096
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1097 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1098 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1099 * check for command context
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1100 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1101 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1102 switch( simEntStat.curCmd )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1103 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1104 case( AT_CMD_CLCK ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1105 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1106 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1107 * process event for +CLCK command
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1108 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1109 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1110 switch( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1111 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1112 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1113
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1114 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1115
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1116 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1117 ( AT_CMD_CLCK );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1118 cmh_logRslt ( simEntStat.entOwn, RAT_OK, AT_CMD_CLCK, -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1119 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1120
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1121 case( SIM_CAUSE_PIN1_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1122 case( SIM_CAUSE_PIN1_BLOCKED ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1123 err = CME_ERR_WrongPasswd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1124 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1125
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1126 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1127 err = cmhSIM_GetCmeFromSim ( simShrdPrm.rslt );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1128 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1129 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1130
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1131 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1132
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1133 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1134 ( AT_CMD_CLCK, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1135 cmh_logRslt ( simEntStat.entOwn, RAT_CME, AT_CMD_CLCK,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1136 -1, -1, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1137 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1138 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1139 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1140
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1141 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1142 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1143 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1144 | ROUTINE : cmhSIM_PINDisabled |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1145 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1146
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1147 PURPOSE : SIM disabled
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1148
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1149 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1150
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1151 GLOBAL void cmhSIM_PINDisabled ( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1152 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1153 T_ACI_CME_ERR err;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1154
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1155 TRACE_FUNCTION ("cmhSIM_PINDisabled()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1156
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1157 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1158 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1159 * check for command context
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1160 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1161 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1162 switch( simEntStat.curCmd )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1163 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1164 case( AT_CMD_CLCK ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1165 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1166 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1167 * process event for +CLCK command
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1168 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1169 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1170 switch( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1171 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1172 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1173
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1174 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1175
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1176 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1177 ( AT_CMD_CLCK );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1178 cmh_logRslt ( simEntStat.entOwn, RAT_OK, AT_CMD_CLCK, -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1179 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1180
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1181 case( SIM_CAUSE_PIN1_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1182 case( SIM_CAUSE_PIN1_BLOCKED ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1183 err = CME_ERR_WrongPasswd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1184 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1185
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1186 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1187 err = cmhSIM_GetCmeFromSim ( simShrdPrm.rslt );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1188 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1189 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1190
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1191 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1192
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1193 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1194 ( AT_CMD_CLCK, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1195 cmh_logRslt ( simEntStat.entOwn, RAT_CME, AT_CMD_CLCK,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1196 -1, -1, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1197 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1198 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1199 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1200
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1201 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1202 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1203 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1204 | ROUTINE : cmhSIM_CardUnblocked |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1205 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1206
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1207 PURPOSE : Card unblocked
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1208
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1209 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1210
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1211 GLOBAL void cmhSIM_CardUnblocked ( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1212 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1213 UBYTE cmdBuf;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1214 T_ACI_CME_ERR err;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1215
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1216 TRACE_FUNCTION ("cmhSIM_CardUnblocked()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1217
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1218 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1219 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1220 * check for command context
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1221 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1222 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1223 switch( simEntStat.curCmd )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1224 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1225 case( AT_CMD_CPIN ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1226 case( AT_CMD_PVRF ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1227 /*lint -e{408} */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1228 case( KSD_CMD_UBLK ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1229 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1230 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1231 * process event for +CPIN, %PVRF and KSD UBLK command
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1232 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1233 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1234 switch( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1235 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1236 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1237
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1238 if(simShrdPrm.crdPhs NEQ 0xFF)/* If SIM insert indication is already received*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1239 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1240 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1241 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1242
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1243 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1244 ( cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1245 cmh_logRslt ( simEntStat.entOwn, RAT_OK, cmdBuf, -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1246 }/* else wait till SIM insert indication is received*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1247 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1248
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1249 /* why not use a meaningful CME error code?
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1250 case( SIM_CAUSE_PUK1_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1251 case( SIM_CAUSE_PUK2_EXPECT ): */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1252 case( SIM_CAUSE_PIN1_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1253 case( SIM_CAUSE_PIN2_EXPECT ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1254 err = CME_ERR_WrongPasswd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1255 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1256
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1257 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1258 err = cmhSIM_GetCmeFromSim ( simShrdPrm.rslt );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1259 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1260 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1261
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1262 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1263 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1264
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1265 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1266 ( cmdBuf, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1267 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1268 -1, -1, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1269 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1270 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1271 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1272
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1273 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1274 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1275 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1276 | ROUTINE : cmhSIM_SIMResponseData |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1277 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1278
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1279 PURPOSE : SIM response data
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1280
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1281 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1282
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1283 GLOBAL void cmhSIM_SIMResponseData( T_SIM_TRNS_RSP_PRM* rsp )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1284 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1285 UBYTE cmdBuf; /* buffers command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1286 T_ACI_CMD_SRC ownBuf; /* buffers current owner */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1287 UBYTE *rspData;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1288
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1289 TRACE_FUNCTION ("cmhSIM_SIMResponseData()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1290
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1291 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1292 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1293
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1294 ownBuf = simEntStat.entOwn;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1295 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1296
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1297 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1298 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1299 * check for command context
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1300 *-------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1301 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1302 switch( cmdBuf )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1303 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1304 case( AT_CMD_CRSM ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1305 if (simShrdPrm.rslt NEQ SIM_NO_ERROR AND
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1306 GET_CAUSE_DEFBY(simShrdPrm.rslt) EQ DEFBY_CONDAT )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1307 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1308 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1309 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1310 * error event for +CRSM
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1311 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1312 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1313 R_AT( RAT_CME, ownBuf )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1314 (
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1315 cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1316 cmhSIM_GetCmeFromSim ( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1317 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1318 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1319 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1320 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1321 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1322 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1323 * process event for +CRSM
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1324 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1325 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1326 R_AT( RAT_CRSM, ownBuf )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1327 ( rsp->sw1, rsp->sw2, rsp->rspLen, ((rsp->rspLen)?rsp->rsp:NULL));
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1328
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1329 R_AT( RAT_OK, ownBuf )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1330 ( cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1331 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1332 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1333
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1334 case( AT_CMD_CSIM ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1335 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1336 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1337 * error event for +CSIM
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1338 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1339 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1340 if (simShrdPrm.rslt NEQ SIM_NO_ERROR)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1341 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1342 R_AT( RAT_CME, ownBuf )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1343 (
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1344 cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1345 cmhSIM_GetCmeFromSim ( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1346 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1347
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1348 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1349 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1350 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1351 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1352 * process event for +CSIM
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1353 *----------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1354 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1355 ACI_MALLOC(rspData, MAX_SIM_CMD+2); /* alloc 2 byte more for sw1 and sw2 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1356 memcpy (rspData, rsp->rsp, rsp->rspLen);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1357 rspData[rsp->rspLen++] = rsp->sw1;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1358 rspData[rsp->rspLen++] = rsp->sw2;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1359
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1360 R_AT( RAT_CSIM, ownBuf )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1361 ( rsp->rspLen, rspData);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1362
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1363 ACI_MFREE(rspData);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1364
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1365 R_AT( RAT_OK, ownBuf )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1366 ( cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1367 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1368
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1369 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1370 TRACE_EVENT("wrong command context (+CRSM or +CSIM expected)");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1371 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1372 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1373 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1374
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1375 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1376 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1377 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1378 | ROUTINE : cmhSIM_CnfMsisdn |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1379 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1380
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1381 PURPOSE : This function handles the confirmation of reading
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1382 EF MSISDN from SIM.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1383 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1384 GLOBAL void cmhSIM_CnfMsisdn ( SHORT table_id )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1385 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1386 T_SIM_CMD_PRM* pSIMCmdPrm; /* points to SIM command parameters */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1387 T_ACI_AT_CMD cmdBuf; /* buffers current command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1388 T_ACI_CMD_SRC ownBuf; /* buffers current owner */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1389
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1390 UBYTE* ptr; /* pointer to decoded data */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1391 UBYTE alphaLen; /* max. length of alpha identifier */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1392 UBYTE tmpActRec; /* actual record number */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1393 UBYTE* pExchData; /* points to exchange data buffer */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1394 UBYTE dataLen; /* holds length of data */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1395
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1396 TRACE_FUNCTION ("cmhSIM_CnfMsisdn()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1397
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1398 pSIMCmdPrm = &cmhPrm[simEntStat.entOwn].simCmdPrm;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1399 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1400 ownBuf = simEntStat.entOwn;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1401 pExchData = simShrdPrm.atb[table_id].exchData;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1402 dataLen = simShrdPrm.atb[table_id].dataLen;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1403
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1404
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1405 switch ( simShrdPrm.atb[table_id].errCode )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1406 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1407 case ( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1408 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1409 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1410 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1411 * check basic consistency of read data
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1412 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1413 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1414 if ( pExchData EQ NULL OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1415 dataLen < ACI_MIN_SIZE_EF_MSISDN )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1416 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1417 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1418 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1419
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1420 R_AT( RAT_CME, ownBuf ) ( cmdBuf, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1421 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1422 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1423 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1424 ptr = pExchData;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1425 alphaLen = dataLen - ACI_MIN_SIZE_EF_MSISDN;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1426
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1427 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1428 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1429 * process parameter <lenEfMsisdn>
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1430 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1431 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1432 CNUMLenEfMsisdn = dataLen;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1433
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1434 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1435 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1436 * process parameter <cnumMaxRec>
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1437 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1438 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1439 if ( pSIMCmdPrm -> CNUMActRec EQ 1 )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1440 CNUMMaxRec = simShrdPrm.atb[table_id].recMax;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1441
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1442 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1443 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1444 * process parameter <alpha>
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1445 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1446 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1447 cmhPHB_getTagNt ( ptr,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1448 alphaLen,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1449 CNUMMsisdn[CNUMMsisdnIdx].alpha,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1450 MAX_ALPHA_LEN );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1451
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1452 ptr += alphaLen;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1453
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1454 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1455 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1456 * process parameter <number>
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1457 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1458 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1459 cmhPHB_getAdrStr ( CNUMMsisdn[CNUMMsisdnIdx].number,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1460 MAX_PHB_NUM_LEN - 1,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1461 ptr + 2,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1462 *ptr );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1463
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1464 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1465 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1466 * validate entry of MSISDN list
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1467 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1468 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1469 /* VO patch 14.03.01
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1470 * move validate entry to after decoding alpha and number
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1471 * and set the vldFlag only when the alpha or the number exists. */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1472 if ( strlen(CNUMMsisdn[CNUMMsisdnIdx].number) OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1473 strlen(CNUMMsisdn[CNUMMsisdnIdx].alpha) )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1474 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1475 CNUMMsisdn[CNUMMsisdnIdx].vldFlag = TRUE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1476 pSIMCmdPrm -> CNUMOutput++;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1477 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1478
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1479 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1480 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1481 * process parameter <type>
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1482 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1483 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1484 cmhPHB_toaDmrg ( *( ptr + 1 ),
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1485 &CNUMMsisdn[CNUMMsisdnIdx].type );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1486
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1487 ptr += 12;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1488
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1489 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1490 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1491 * invalidate parameter <speed>, <service>, <itc>
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1492 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1493 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1494 CNUMMsisdn[CNUMMsisdnIdx].speed = BS_SPEED_NotPresent;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1495 CNUMMsisdn[CNUMMsisdnIdx].service = CNUM_SERV_NotPresent;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1496 CNUMMsisdn[CNUMMsisdnIdx].itc = CNUM_ITC_NotPresent;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1497
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1498 if ( *ptr NEQ 0xFF )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1499 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1500 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1501 *---------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1502 * bearer capability EF present
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1503 *---------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1504 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1505 if ( cmhSIM_ReqCcp ( ownBuf, *ptr++ ) NEQ AT_EXCT )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1506 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1507 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1508 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1509
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1510 R_AT( RAT_CME, ownBuf ) ( cmdBuf, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1511 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1512 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1513 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1514 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1515 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1516 *---------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1517 * tmpActRec is used to prevent conflicts with global
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1518 * variable pSIMCmdPrm -> CNUMActRec
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1519 *---------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1520 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1521 tmpActRec = pSIMCmdPrm -> CNUMActRec;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1522
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1523 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1524 *---------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1525 * bearer capability EF abscent
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1526 *---------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1527 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1528 /* VO patch 14.03.01 - check vldFlag when it isn't TRUE decrease CNUMMsisdnIdx.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1529 * read the next entry and write the entry in the CNUMMsisdnIdx again */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1530 if ( CNUMMsisdn[CNUMMsisdnIdx].vldFlag EQ FALSE )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1531 CNUMMsisdnIdx--;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1532
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1533 if ( CNUMMsisdnIdx EQ MAX_MSISDN - 1 OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1534 tmpActRec EQ CNUMMaxRec )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1535 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1536 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1537 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1538
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1539 R_AT( RAT_CNUM, ownBuf ) ( &CNUMMsisdn[0], CNUMMaxRec );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1540
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1541 if ( tmpActRec EQ CNUMMaxRec )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1542 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1543 if (pSIMCmdPrm -> CNUMOutput)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1544 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1545 R_AT( RAT_OK, ownBuf ) ( cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1546 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1547 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1548 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1549 R_AT( RAT_CME, ownBuf ) ( cmdBuf, CME_ERR_NotFound );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1550 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1551 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1552 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1553 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1554 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1555 CNUMMsisdnIdx++;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1556 pSIMCmdPrm -> CNUMActRec++;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1557
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1558 if ( cmhSIM_ReqMsisdn
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1559 ( ownBuf, pSIMCmdPrm -> CNUMActRec ) NEQ AT_EXCT )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1560 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1561 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1562 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1563
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1564 R_AT( RAT_CME, ownBuf ) ( cmdBuf, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1565 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1566 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1567 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1568 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1569
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1570 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1571 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1572
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1573 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1574 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1575 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1576 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1577
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1578 R_AT( RAT_CME, ownBuf )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1579 (
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1580 cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1581 cmhSIM_GetCmeFromSim ( simShrdPrm.atb[table_id].errCode )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1582 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1583 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1584 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1585
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1586 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1587
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1588 simShrdPrm.atb[table_id].ntryUsdFlg = FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1589 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1590
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1591 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1592 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1593 | PROJECT : GSM-F&D (8411) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1594 | STATE : code ROUTINE : cmhSIM_CnfCcp |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1595 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1596
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1597 PURPOSE : This function handles the confirmation of reading
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1598 EF CCP from SIM.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1599 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1600 GLOBAL void cmhSIM_CnfCcp ( SHORT table_id )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1601 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1602 T_SIM_CMD_PRM* pSIMCmdPrm; /* points to SIM command parameters */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1603 T_ACI_AT_CMD cmdBuf; /* buffers current command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1604 T_ACI_CMD_SRC ownBuf; /* buffers current owner */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1605
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1606 T_U_CALL_CONF* callCnf; /* call confirm message */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1607 T_bearer_cap* bearCap; /* bearer capability */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1608 UBYTE tmpActRec; /* actual record number */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1609 UBYTE* pExchData; /* points to exchange data buffer */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1610 UBYTE dataLen; /* holds length of data */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1611
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1612 TRACE_FUNCTION ("cmhSIM_CnfCcp()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1613
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1614 pSIMCmdPrm = &cmhPrm[simEntStat.entOwn].simCmdPrm;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1615 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1616 ownBuf = simEntStat.entOwn;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1617 dataLen = simShrdPrm.atb[table_id].dataLen;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1618 pExchData = simShrdPrm.atb[table_id].exchData;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1619
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1620 switch ( simShrdPrm.atb[table_id].errCode )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1621 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1622 case ( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1623 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1624 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1625 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1626 * check basic consistency of read data
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1627 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1628 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1629 if ( pExchData EQ NULL OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1630 dataLen NEQ ACI_SIZE_EF_CCP )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1631 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1632 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1633 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1634
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1635 R_AT( RAT_CME, ownBuf ) ( cmdBuf, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1636 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1637 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1638 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1639 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1640 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1641 * extracting the relevant data from bearer capability IE
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1642 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1643 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1644 UBYTE bearCapLen = pExchData[0];
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1645
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1646 if (bearCapLen <= 13 ) /* do not decode empty or invalid entries,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1647 see 11.11/10.5.4.1 max 14 bytes */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1648 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1649 PALLOC_MSG ( msg, MMCC_DATA_REQ, U_CALL_CONF);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1650
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1651 msg -> sdu.l_buf = bearCapLen * 0x08;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1652 msg -> sdu.o_buf = 0x08;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1653 msg -> sdu.buf[0] = 0x83;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1654 msg -> sdu.buf[1] = U_CALL_CONF;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1655
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1656 memcpy ( &msg -> sdu.buf[2],
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1657 pExchData,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1658 bearCapLen + 1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1659
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1660 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1661 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1662 * use of CCD for decoding of bearer capability
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1663 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1664 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1665 CCD_START;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1666
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1667 memset (_decodedMsg, 0, sizeof (_decodedMsg));
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1668
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1669 if ( ccd_decodeMsg ( CCDENT_CC,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1670 UPLINK,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1671 (T_MSGBUF *) &msg->sdu,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1672 (UBYTE *) _decodedMsg,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1673 NOT_PRESENT_8BIT) EQ ccdOK
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1674 AND
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1675
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1676 _decodedMsg[0] EQ U_CALL_CONF )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1677 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1678 callCnf = ( T_U_CALL_CONF * )&_decodedMsg[0];
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1679
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1680 if ( callCnf -> v_bearer_cap )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1681 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1682 bearCap = &callCnf -> bearer_cap;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1683
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1684 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1685 *-------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1686 * process parameter <speed> of MSISDN
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1687 *-------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1688 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1689 if ( bearCap -> v_user_rate )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1690 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1691 CNUMMsisdn[CNUMMsisdnIdx].speed =
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1692 cmhSIM_GetUserRate ( bearCap -> user_rate );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1693 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1694
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1695 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1696 *-------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1697 * process parameter <itc> and <service> of MSISDN
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1698 *-------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1699 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1700 if ( bearCap -> v_trans_cap )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1701 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1702 CNUMMsisdn[CNUMMsisdnIdx].itc =
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1703 cmhSIM_GetItc ( bearCap -> trans_cap );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1704 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1705
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1706 if ( bearCap -> v_user_inf_l2_prot AND
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1707 bearCap -> user_inf_l2_prot EQ L2_X25 AND
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1708 bearCap -> v_sync_async AND
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1709 bearCap -> sync_async EQ SYNCHRONOUS )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1710 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1711 CNUMMsisdn[CNUMMsisdnIdx].service =
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1712 CNUM_SERV_PacketSynch;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1713 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1714 else if
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1715 ( bearCap -> v_sig_access_prot
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1716 AND
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1717 ( bearCap -> sig_access_prot EQ SIAP_X28_INDIV_NUI OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1718 bearCap -> sig_access_prot EQ SIAP_X28_UNIV_NUI OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1719 bearCap -> sig_access_prot EQ SIAP_X28_NON_DEDIC
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1720 )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1721 AND
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1722 bearCap -> v_sync_async
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1723 AND
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1724 bearCap -> sync_async EQ ASYNCHRONOUS
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1725 )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1726 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1727 CNUMMsisdn[CNUMMsisdnIdx].service =
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1728 CNUM_SERV_PadAsynch;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1729 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1730 else if ( bearCap -> v_sync_async )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1731 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1732 CNUMMsisdn[CNUMMsisdnIdx].service =
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1733 cmhSIM_GetSrvFromSync ( bearCap -> sync_async );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1734
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1735 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1736 else if ( bearCap -> v_trans_cap )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1737 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1738 CNUMMsisdn[CNUMMsisdnIdx].service =
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1739 cmhSIM_GetSrvFromItc ( bearCap -> trans_cap );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1740 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1741 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1742 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1743 CCD_END;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1744
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1745 PFREE ( msg );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1746 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1747
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1748 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1749 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1750 * tmpActRec is used to prevent conflicts with global
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1751 * variable pSIMCmdPrm -> CNUMActRec
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1752 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1753 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1754 tmpActRec = pSIMCmdPrm -> CNUMActRec;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1755
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1756 if ( CNUMMsisdnIdx EQ MAX_MSISDN - 1 OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1757 tmpActRec EQ CNUMMaxRec )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1758 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1759 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1760 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1761
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1762 R_AT( RAT_CNUM, ownBuf ) ( &CNUMMsisdn[0], CNUMMaxRec );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1763
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1764 if ( tmpActRec EQ CNUMMaxRec )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1765 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1766 if (pSIMCmdPrm -> CNUMOutput)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1767 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1768 R_AT( RAT_OK, ownBuf ) ( cmdBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1769 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1770 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1771 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1772 R_AT( RAT_CME, ownBuf ) ( cmdBuf, CME_ERR_NotFound );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1773 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1774 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1775 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1776 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1777 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1778 CNUMMsisdnIdx++;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1779 pSIMCmdPrm -> CNUMActRec++;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1780
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1781 if ( cmhSIM_ReqMsisdn
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1782 ( ownBuf, pSIMCmdPrm -> CNUMActRec ) NEQ AT_EXCT )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1783 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1784 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1785 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1786
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1787 R_AT( RAT_CME, ownBuf ) ( cmdBuf, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1788 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1789 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1790 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1791
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1792 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1793 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1794
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1795 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1796 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1797 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1798 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1799
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1800 R_AT( RAT_CME, ownBuf )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1801 (
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1802 cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1803 cmhSIM_GetCmeFromSim ( simShrdPrm.atb[table_id].errCode )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1804 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1805 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1806 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1807
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1808 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1809
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1810 simShrdPrm.atb[table_id].ntryUsdFlg = FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1811 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1812
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1813 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1814 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1815 | PROJECT : GSM-F&D (8411) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1816 | STATE : code ROUTINE : cmhSIM_RdCnfPlmnSel|
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1817 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1818
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1819 PURPOSE : This function handles the confirmation of reading
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1820 EF PLMN SEL from SIM.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1821 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1822 GLOBAL void cmhSIM_RdCnfPlmnSel ( SHORT table_id )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1823 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1824 T_SIM_CMD_PRM * pSIMCmdPrm; /* points to SIM command parameters */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1825 T_ACI_AT_CMD cmdBuf; /* buffers current command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1826 T_ACI_CMD_SRC ownBuf; /* buffers current owner */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1827 T_ACI_CPOL_LST CPOLPlmnSelLst; /* PLMN SEL list */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1828 T_ACI_RETURN ret;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1829 SHORT lastIdx; /* holds last index */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1830 SHORT usdNtry; /* holds number of used entries */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1831
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1832 TRACE_FUNCTION ("cmhSIM_RdCnfPlmnSel()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1833
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1834 pSIMCmdPrm = &cmhPrm[simEntStat.entOwn].simCmdPrm;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1835 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1836 ownBuf = simEntStat.entOwn;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1837
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1838
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1839 switch ( simShrdPrm.atb[table_id].errCode )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1840 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1841 case ( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1842 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1843 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1844 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1845 * check basic consistency of read data
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1846 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1847 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1848 if ( simShrdPrm.atb[table_id].exchData EQ NULL OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1849 simShrdPrm.atb[table_id].dataLen < ACI_MIN_SIZE_EF_PLMN_SEL)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1850 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1851 pSIMCmdPrm->CPOLact = CPOL_ACT_None;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1852 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1853 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1854
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1855 R_AT( RAT_CME, ownBuf ) ( cmdBuf, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1856 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1857 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1858
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1859 EfPLMNselStat = EF_STAT_READ;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1860 CPOLSimEfDataLen = simShrdPrm.atb[table_id].dataLen;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1861
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1862 if( pSIMCmdPrm->CPOLmode EQ CPOL_MOD_CompactList )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1863 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1864 cmhSIM_CmpctPlmnSel( simShrdPrm.atb[table_id].dataLen,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1865 simShrdPrm.atb[table_id].exchData );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1866 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1867
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1868 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1869 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1870 * what is to do ?
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1871 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1872 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1873 switch( pSIMCmdPrm->CPOLact )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1874 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1875 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1876 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1877 * read out PLMN SEL list
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1878 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1879 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1880 case( CPOL_ACT_Read ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1881
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1882 /* fill in buffer */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1883 lastIdx = cmhSIM_FillPlmnSelList(pSIMCmdPrm->CPOLidx,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1884 pSIMCmdPrm->CPOLfrmt,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1885 &CPOLPlmnSelLst[0],
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1886 simShrdPrm.atb[table_id].dataLen,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1887 (UBYTE *)simShrdPrm.atb[table_id].exchData);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1888 /* notify about PLMN SEL list */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1889 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1890 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1891
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1892 R_AT( RAT_CPOL, ownBuf ) ( ACI_NumParmNotPresent,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1893 lastIdx,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1894 &CPOLPlmnSelLst[0],
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1895 ACI_NumParmNotPresent );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1896
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1897 R_AT( RAT_OK, ownBuf )( AT_CMD_CPOL );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1898 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1899
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1900 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1901 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1902 * write PLMN SEL list
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1903 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1904 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1905 case( CPOL_ACT_Write ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1906
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1907 if( pSIMCmdPrm->CPOLidx EQ NOT_PRESENT_8BIT )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1908
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1909 ret = cmhSIM_FndEmptyPlmnSel( simEntStat.entOwn,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1910 pSIMCmdPrm->CPOLplmn );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1911 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1912
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1913 ret = cmhSIM_UpdPlmnSel( simEntStat.entOwn,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1914 pSIMCmdPrm->CPOLidx,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1915 pSIMCmdPrm->CPOLplmn,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1916 pSIMCmdPrm->CPOLmode);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1917 if( ret EQ AT_FAIL )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1918 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1919 pSIMCmdPrm->CPOLact = CPOL_ACT_None;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1920 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1921 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1922
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1923 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1924 (
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1925 AT_CMD_CPOL,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1926 ACI_ERR_DESC_NR( aciErrDesc )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1927 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1928 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1929 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1930
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1931 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1932 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1933 * delete PLMN SEL entry
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1934 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1935 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1936 case( CPOL_ACT_Delete ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1937
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1938 if( pSIMCmdPrm->CPOLidx2 EQ NOT_PRESENT_8BIT )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1939
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1940 ret = cmhSIM_DelPlmnSel( simEntStat.entOwn,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1941 pSIMCmdPrm->CPOLidx,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1942 pSIMCmdPrm->CPOLmode );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1943 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1944
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1945 ret = cmhSIM_ChgPlmnSel( simEntStat.entOwn,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1946 pSIMCmdPrm->CPOLidx,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1947 pSIMCmdPrm->CPOLidx2 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1948
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1949 if( ret EQ AT_FAIL )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1950 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1951 pSIMCmdPrm->CPOLact = CPOL_ACT_None;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1952 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1953 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1954
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1955 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1956 (
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1957 AT_CMD_CPOL,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1958 ACI_ERR_DESC_NR( aciErrDesc )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1959 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1960 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1961 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1962
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1963 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1964 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1965 * test PLMN SEL entry number
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1966 *-----------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1967 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1968 case( CPOL_ACT_Test ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1969
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1970 /* notify about PLMN SEL entry number */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1971 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1972 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1973
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1974 lastIdx = CPOLSimEfDataLen / ACI_LEN_PLMN_SEL_NTRY;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1975 usdNtry = cmhSIM_UsdPlmnSelNtry( CPOLSimEfDataLen,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1976 (UBYTE *)simShrdPrm.atb[table_id].exchData );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1977
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1978 R_AT( RAT_CPOL, ownBuf ) ( ACI_NumParmNotPresent,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1979 lastIdx,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1980 NULL,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1981 usdNtry );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1982
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1983 R_AT( RAT_OK, ownBuf )( AT_CMD_CPOL );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1984 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1985 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1986 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1987 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1988
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1989 case ( SIM_CAUSE_UNKN_FILE_ID ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1990 EfPLMNselStat = EF_STAT_NOT_AVAIL;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1991 /*lint -fallthrough*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1992 /*lint -fallthrough*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1993 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1994 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1995 pSIMCmdPrm->CPOLact = CPOL_ACT_None;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1996 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1997 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1998
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1999 R_AT( RAT_CME, ownBuf )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2000 (
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2001 cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2002 cmhSIM_GetCmeFromSim ( simShrdPrm.atb[table_id].errCode )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2003 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2004 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2005 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2006
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2007 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2008
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2009 simShrdPrm.atb[table_id].ntryUsdFlg = FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2010
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2011 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2012
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2013 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2014 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2015 | PROJECT : GSM-F&D (8411) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2016 | STATE : code ROUTINE : cmhSIM_WrCnfPlmnSel|
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2017 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2018
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2019 PURPOSE : This function handles the confirmation of writing
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2020 EF PLMN SEL to SIM.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2021 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2022 GLOBAL void cmhSIM_WrCnfPlmnSel ( SHORT table_id )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2023 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2024 T_SIM_CMD_PRM * pSIMCmdPrm; /* points to SIM command parameters */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2025 UBYTE ownBuf;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2026
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2027 TRACE_FUNCTION ("cmhSIM_WrCnfPlmnSel()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2028
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2029 pSIMCmdPrm = &cmhPrm[simEntStat.entOwn].simCmdPrm;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2030 ownBuf = simEntStat.entOwn;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2031
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2032 switch ( simShrdPrm.atb[table_id].errCode )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2033 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2034 /* successful PLMN SEL list update */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2035 case ( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2036 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2037 pSIMCmdPrm->CPOLact = CPOL_ACT_None;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2038 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2039 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2040
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2041 R_AT( RAT_OK, ownBuf )( AT_CMD_CPOL );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2042 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2043 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2044 case SIM_CAUSE_ACCESS_PROHIBIT:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2045 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2046 pSIMCmdPrm->CPOLact = CPOL_ACT_None;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2047 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2048 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2049
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2050 R_AT( RAT_CME, ownBuf /*simEntStat.entOwn*/ )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2051 (
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2052 AT_CMD_CPOL,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2053 CME_ERR_OpNotAllow
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2054 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2055 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2056 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2057
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2058 /* unsuccessful PLMN SEL list update */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2059 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2060 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2061 pSIMCmdPrm->CPOLact = CPOL_ACT_None;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2062 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2063 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2064
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2065 R_AT( RAT_CME, ownBuf /*simEntStat.entOwn*/ )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2066 (
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2067 AT_CMD_CPOL,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2068 cmhSIM_GetCmeFromSim ( simShrdPrm.atb[table_id].errCode )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2069 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2070 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2071 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2072 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2073
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2074 simShrdPrm.atb[table_id].ntryUsdFlg = FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2075 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2076
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2077 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2078 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2079 | PROJECT : GSM-F&D (8411) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2080 | STATE : code ROUTINE : cmhSIM_RdCnfLangELP|
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2081 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2082
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2083 PURPOSE : This function handles the confirmation of reading
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2084 from the SIM (EF ELP).
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2085 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2086 GLOBAL void cmhSIM_RdCnfLangELP ( SHORT table_id )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2087 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2088 T_SIM_CMD_PRM *pSIMCmdPrm; /* points to SIM command parameters */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2089 T_PHB_CMD_PRM *pPHBCmdPrm; /* points to PHB command parameter */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2090
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2091 T_ACI_AT_CMD cmdBuf; /* buffers current command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2092 T_ACI_CMD_SRC ownBuf; /* buffers current owner */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2093 CHAR Clang_buffer[3]={0};/* Current language */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2094 T_ACI_LAN_SUP clng;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2095 CHAR *ef = EF_CLNG_ID;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2096 EF_CLNG lng;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2097 BOOL Suplng = FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2098 T_ACI_LAN_SUP LngPCMsupLst[MAX_LAN];
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2099 SHORT lastIdx;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2100 T_ACI_RETURN ret ;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2101
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2102 TRACE_FUNCTION ("cmhSIM_RdCnfLangELP()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2103
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2104 pSIMCmdPrm = &cmhPrm[simEntStat.entOwn].simCmdPrm;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2105 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2106 ownBuf = simEntStat.entOwn;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2107 pPHBCmdPrm = &cmhPrm[ownBuf].phbCmdPrm;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2108 simShrdPrm.atb[table_id].ntryUsdFlg = FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2109 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2110
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2111 clng.str = Clang_buffer;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2112
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2113 switch ( simShrdPrm.atb[table_id].errCode )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2114 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2115 case ( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2116 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2117 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2118 * check basic consistency of read data
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2119 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2120 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2121 if ( simShrdPrm.atb[table_id].exchData EQ NULL OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2122 simShrdPrm.atb[table_id].dataLen < ACI_MIN_SIZE_EF_LAN)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2123
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2124 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2125 pSIMCmdPrm->CLANact = CLAN_ACT_None;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2126 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2127
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2128 R_AT( RAT_CME, ownBuf ) ( cmdBuf, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2129 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2130 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2131
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2132 memcpy(clng.str, (UBYTE *)simShrdPrm.atb[table_id].exchData, CLAN_CODE_LEN);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2133 ret=getSupLangFromPCM(&LngPCMsupLst[0], &lastIdx);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2134 if (ret EQ AT_FAIL)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2135 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2136 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2137 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2138 Suplng=checkSuppLang(&LngPCMsupLst[0],lastIdx, &clng);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2139
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2140 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2141
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2142 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2143 *---------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2144 * check if the language,which was read from EF ELP is supported in PCM
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2145 *---------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2146 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2147 if(Suplng)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2148 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2149 switch( pSIMCmdPrm->CLANact )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2150 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2151 case( CLAN_ACT_Read ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2152 R_AT( RAT_CLAN, ownBuf ) (&clng);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2153 R_AT( RAT_OK, ownBuf )( AT_CMD_CLAN );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2154 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2155 case( CLAN_ACT_Write ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2156 memcpy(lng.data,clng.str ,CLAN_CODE_LEN);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2157 pcm_WriteFile (( UBYTE* )ef,SIZE_EF_CLNG,( UBYTE*) &lng);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2158
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2159 if (pPHBCmdPrm->CLAEmode EQ CLAE_MOD_Enable)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2160 R_AT( RAT_CLAE, ownBuf ) (&clng);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2161
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2162 R_AT( RAT_OK, ownBuf )( AT_CMD_CLAN );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2163 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2164 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2165 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2166 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2167 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2168 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2169 * read the EF LP if the language is not supported in PCM
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2170 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2171 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2172 cmhSIM_ReqLanguageLP (ownBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2173 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2174
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2175 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2176 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2177 * read the EF LP if the EF ELP not available
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2178 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2179 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2180 case ( SIM_CAUSE_UNKN_FILE_ID ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2181 cmhSIM_ReqLanguageLP (ownBuf );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2182 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2183
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2184 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2185 pSIMCmdPrm->CLANact = CLAN_ACT_None;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2186 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2187
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2188 R_AT( RAT_CME, ownBuf) ( AT_CMD_CLAN, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2189 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2190
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2191 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2192
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2193 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2194
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2195
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2196 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2197 +------------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2198 | PROJECT : GSM-F&D (8411) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2199 | STATE : code ROUTINE : cmhSIM_RdCnfLangPrfELP |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2200 +------------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2201
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2202 PURPOSE : This function handles the confirmation of reading
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2203 from the SIM (EF ELP) for SAT feature LS.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2204 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2205 GLOBAL void cmhSIM_RdCnfLangPrfELP ( SHORT table_id )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2206 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2207
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2208 T_ACI_SAT_TERM_RESP resp_data;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2209 CHAR Clang_buffer[3]={0};/* Current language */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2210 T_ACI_LAN_SUP clng;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2211 BOOL Suplng = FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2212 T_ACI_LAN_SUP LngPCMsupLst[MAX_LAN];
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2213 SHORT lastIdx;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2214 T_ACI_RETURN ret ;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2215
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2216
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2217 TRACE_FUNCTION ("cmhSIM_RdCnfLangPrfELP()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2218
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2219 psaSAT_InitTrmResp( &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2220
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2221 simShrdPrm.atb[table_id].ntryUsdFlg = FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2222
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2223 clng.str = Clang_buffer;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2224
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2225 switch ( simShrdPrm.atb[table_id].errCode )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2226 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2227 case ( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2228 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2229 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2230 * check basic consistency of read data
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2231 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2232 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2233 if ( simShrdPrm.atb[table_id].exchData EQ NULL OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2234 simShrdPrm.atb[table_id].dataLen < ACI_MIN_SIZE_EF_LAN)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2235
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2236 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2237 psaSAT_SendTrmResp( RSLT_ME_UNAB_PROC, &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2238 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2239 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2240
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2241 memcpy(clng.str, (UBYTE *)simShrdPrm.atb[table_id].exchData, CLAN_CODE_LEN);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2242 ret=getSupLangFromPCM(&LngPCMsupLst[0], &lastIdx);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2243 if (ret EQ AT_FAIL)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2244 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2245 psaSAT_SendTrmResp( RSLT_ME_UNAB_PROC, &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2246 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2247 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2248
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2249 Suplng=checkSuppLang(&LngPCMsupLst[0],lastIdx, &clng);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2250
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2251
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2252 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2253 *---------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2254 * check if the language,which was read from EF ELP is supported in PCM
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2255 *---------------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2256 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2257 if(Suplng)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2258 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2259 /* Send Terminal resp*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2260 memcpy(&resp_data.lang, (UBYTE *)simShrdPrm.atb[table_id].exchData, CLAN_CODE_LEN);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2261
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2262 #ifdef _SIMULATION_
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2263 memset(resp_data.lang, 0xA0, 2);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2264 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2265
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2266 psaSAT_SendTrmResp( RSLT_PERF_SUCCESS, &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2267
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2268 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2269 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2270 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2271 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2272 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2273 * read the EF LP if the language is not supported in PCM
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2274 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2275 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2276 if (cmhSIM_ReqLanguagePrfLP () EQ FALSE)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2277 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2278 psaSAT_SendTrmResp( RSLT_ME_UNAB_PROC, &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2279 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2280 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2281 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2282
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2283 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2284 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2285 * read the EF LP if the EF ELP not available
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2286 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2287 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2288 case ( SIM_CAUSE_UNKN_FILE_ID ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2289 if (cmhSIM_ReqLanguagePrfLP () EQ FALSE)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2290 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2291 psaSAT_SendTrmResp( RSLT_ME_UNAB_PROC, &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2292 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2293 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2294
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2295 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2296 psaSAT_SendTrmResp( RSLT_ME_UNAB_PROC, &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2297 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2298
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2299 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2300 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2301
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2302
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2303 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2304 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2305 | PROJECT : GSM-F&D (8411) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2306 | STATE : code ROUTINE : cmhSIM_RdCnfLangLP |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2307 +--------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2308
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2309 PURPOSE : This function handles the confirmation of reading
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2310 EF LP from SIM.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2311 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2312 GLOBAL void cmhSIM_RdCnfLangLP ( SHORT table_id )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2313 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2314 T_SIM_CMD_PRM * pSIMCmdPrm; /* points to SIM command parameters */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2315 T_PHB_CMD_PRM * pPHBCmdPrm; /* points to PHB command parameter */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2316 T_ACI_AT_CMD cmdBuf; /* buffers current command */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2317 T_ACI_CMD_SRC ownBuf; /* buffers current owner */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2318 T_ACI_LAN_SUP clng;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2319 CHAR* ef = EF_CLNG_ID;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2320 EF_CLNG lng;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2321 BOOL Suplng= FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2322 SHORT lastIdx;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2323 T_ACI_LAN_SUP LngPCMsupLst[MAX_LAN];
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2324
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2325
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2326 TRACE_FUNCTION ("cmhSIM_RdCnfLangLP()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2327
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2328 pSIMCmdPrm = &cmhPrm[simEntStat.entOwn].simCmdPrm;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2329 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2330 ownBuf = simEntStat.entOwn;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2331 pPHBCmdPrm = &cmhPrm[ownBuf].phbCmdPrm;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2332 simShrdPrm.atb[table_id].ntryUsdFlg = FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2333 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2334
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2335 clng.lng=(UBYTE )simShrdPrm.atb[table_id].exchData[0];
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2336
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2337 getSupLangFromPCM(&LngPCMsupLst[0], &lastIdx);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2338 Suplng=checkSuppLangInLP(&LngPCMsupLst[0],lastIdx, &clng);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2339
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2340 if ( simShrdPrm.atb[table_id].errCode EQ SIM_NO_ERROR AND
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2341 Suplng )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2342 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2343
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2344 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2345 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2346 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2347 * check basic consistency of read data
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2348 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2349 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2350 if ( simShrdPrm.atb[table_id].exchData EQ NULL OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2351 simShrdPrm.atb[table_id].dataLen < ACI_LEN_LAN_LP_NTRY)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2352
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2353 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2354 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2355 pSIMCmdPrm->CLANact = CLAN_ACT_None;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2356 R_AT( RAT_CME, ownBuf ) ( cmdBuf, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2357 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2358 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2359
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2360 #ifdef SIM_TOOLKIT
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2361 if (simShrdPrm.fuRef >= 0)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2362 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2363 psaSAT_FUConfirm (simShrdPrm.fuRef, SIM_FU_SUCCESS);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2364 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2365 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2366
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2367 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2368 *-----------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2369 * read the supported laguage or write it PCM
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2370 *-----------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2371 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2372 switch( pSIMCmdPrm->CLANact )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2373 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2374 case( CLAN_ACT_Read ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2375 R_AT( RAT_CLAN, ownBuf ) (&clng);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2376 R_AT( RAT_OK, ownBuf )( AT_CMD_CLAN );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2377 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2378 case( CLAN_ACT_Write ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2379 memcpy(lng.data,(UBYTE *) clng.str,CLAN_CODE_LEN);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2380 pcm_WriteFile (( UBYTE* )ef,SIZE_EF_CLNG,( UBYTE*) &lng);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2381 if (pPHBCmdPrm->CLAEmode EQ CLAE_MOD_Enable)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2382 { R_AT( RAT_CLAE, ownBuf ) (&clng);}
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2383
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2384 R_AT( RAT_OK, ownBuf )( AT_CMD_CLAN );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2385 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2386
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2387 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2388 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2389 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2390 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2391
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2392 #ifdef SIM_TOOLKIT
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2393 if (simShrdPrm.fuRef >= 0)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2394 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2395 psaSAT_FUConfirm (simShrdPrm.fuRef, SIM_FU_ERROR);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2396 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2397 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2398 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2399 *---------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2400 * Preferred language is not supported in MS
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2401 *---------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2402 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2403 if ( simShrdPrm.atb[table_id].errCode EQ SIM_CAUSE_UNKN_FILE_ID OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2404 !Suplng )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2405 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2406 TRACE_FUNCTION ("preferred language not supported");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2407
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2408 switch( pSIMCmdPrm->CLANact )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2409 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2410 case( CLAN_ACT_Read ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2411 R_AT( RAT_CLAN, ownBuf ) (&LngPCMsupLst[0]);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2412 R_AT( RAT_OK, ownBuf )( AT_CMD_CLAN );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2413 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2414 case( CLAN_ACT_Write ): /* Preferred Language not supported,so not change CLAN */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2415 R_AT( RAT_OK, ownBuf )( AT_CMD_CLAN );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2416 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2417 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2418 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2419 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2420 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2421 pSIMCmdPrm->CLANact = CLAN_ACT_None;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2422 simEntStat.entOwn = simShrdPrm.owner = OWN_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2423 R_AT( RAT_CME, ownBuf) ( AT_CMD_CLAN, CME_ERR_Unknown );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2424 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2425 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2426 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2427
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2428
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2429 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2430 +-----------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2431 | PROJECT : GSM-F&D (8411) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2432 | STATE : code ROUTINE : cmhSIM_RdCnfLangPrfLP |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2433 +-----------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2434
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2435 PURPOSE : This function handles the confirmation of reading
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2436 EF LP from SIM for SAT feature LS.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2437 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2438 GLOBAL void cmhSIM_RdCnfLangPrfLP ( SHORT table_id )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2439 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2440
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2441 T_ACI_SAT_TERM_RESP resp_data;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2442 T_ACI_LAN_SUP clng;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2443 BOOL Suplng= FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2444 SHORT lastIdx;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2445 T_ACI_LAN_SUP lngPCMsupLst[MAX_LAN];
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2446 T_ACI_RETURN ret;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2447
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2448 TRACE_FUNCTION ("cmhSIM_RdCnfLangPrfLP()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2449
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2450 psaSAT_InitTrmResp( &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2451
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2452 simShrdPrm.atb[table_id].ntryUsdFlg = FALSE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2453
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2454 clng.lng=(UBYTE )simShrdPrm.atb[table_id].exchData[0];
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2455 ret = getSupLangFromPCM(&lngPCMsupLst[0], &lastIdx);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2456 if(ret EQ AT_FAIL)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2457 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2458 psaSAT_SendTrmResp( RSLT_ME_UNAB_PROC, &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2459 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2460 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2461
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2462 Suplng=checkSuppLangInLP(&lngPCMsupLst[0],lastIdx, &clng);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2463
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2464 if ( simShrdPrm.atb[table_id].errCode EQ SIM_NO_ERROR AND
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2465 Suplng )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2466 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2467
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2468
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2469 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2470 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2471 * check basic consistency of read data
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2472 *-------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2473 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2474 if ( simShrdPrm.atb[table_id].exchData EQ NULL OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2475 simShrdPrm.atb[table_id].dataLen < ACI_LEN_LAN_LP_NTRY)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2476
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2477 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2478 psaSAT_SendTrmResp( RSLT_ME_UNAB_PROC, &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2479 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2480 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2481
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2482
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2483 #ifdef SIM_TOOLKIT
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2484 if (simShrdPrm.fuRef >= 0)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2485 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2486 psaSAT_FUConfirm (simShrdPrm.fuRef, SIM_FU_SUCCESS);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2487 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2488 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2489
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2490 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2491 *-----------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2492 * Send the Terminal Response
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2493 *-----------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2494 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2495 memcpy(&resp_data.lang, (UBYTE* )simShrdPrm.atb[table_id].exchData, CLAN_CODE_LEN);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2496 #ifdef _SIMULATION_
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2497 memset(resp_data.lang, 0xA0, 2);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2498 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2499 psaSAT_SendTrmResp( RSLT_PERF_SUCCESS, &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2500 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2501 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2502 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2503
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2504 #ifdef SIM_TOOLKIT
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2505 if (simShrdPrm.fuRef >= 0)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2506 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2507 psaSAT_FUConfirm (simShrdPrm.fuRef, SIM_FU_ERROR);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2508 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2509 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2510 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2511 *---------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2512 * read default language from ME
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2513 *---------------------------------------------------------------
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2514 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2515
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2516 if ( simShrdPrm.atb[table_id].errCode EQ SIM_CAUSE_UNKN_FILE_ID OR
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2517 !Suplng )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2518 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2519 TRACE_FUNCTION ("default language is selected");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2520 memcpy(&resp_data.lang, &lngPCMsupLst[0].str, CLAN_CODE_LEN);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2521 #ifdef _SIMULATION_
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2522 memset(resp_data.lang, 0xA0, 2);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2523 #endif
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2524 psaSAT_SendTrmResp( RSLT_PERF_SUCCESS, &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2525
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2526 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2527 else
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2528 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2529 psaSAT_SendTrmResp( RSLT_ME_UNAB_PROC, &resp_data );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2530 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2531
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2532 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2533
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2534 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2535
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2536
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2537 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2538 +--------------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2539 | PROJECT : GSM-F&D (8411) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2540 | STATE : code ROUTINE : SIM_ENT_CSDconnect_dti_cb |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2541 +--------------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2542
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2543 PURPOSE : Callback for connection between SIM and TRA/L2R for CSD.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2544
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2545 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2546 #ifdef FF_SAT_E
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2547 #ifdef DTI
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2548 GLOBAL BOOL SIM_ENT_CSDconnect_dti_cb(UBYTE dti_id, T_DTI_CONN_STATE result_type)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2549 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2550 TRACE_FUNCTION("SIM_ENT_CSDconnect_dti_cb");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2551
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2552 switch( result_type)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2553 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2554 case DTI_CONN_STATE_DISCONNECTING:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2555 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2556 case DTI_CONN_STATE_DISCONNECTED:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2557 /* wap_state is set to IPA_Deactivated in psaTCPIP_config_dispatch() */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2558 if (wap_state EQ UDPA_Deactivation)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2559 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2560 wap_state = IPA_Deactivation;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2561 psaUDPIP_config_dispatch();
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2562 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2563 dti_cntrl_erase_entry(dti_id);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2564 dti_cntrl_clear_conn_parms(dti_id);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2565 if (simShrdPrm.sat_class_e_dti_id EQ dti_id)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2566 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2567 simShrdPrm.sat_class_e_dti_id = DTI_DTI_ID_NOTPRESENT;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2568 TRACE_EVENT("sat_class_e_dti_id reset");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2569 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2570 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2571 case DTI_CONN_STATE_CONNECTING:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2572 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2573 case DTI_CONN_STATE_CONNECTED:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2574 /* the SIM-SNDCP connection has been established, now send SIM_BIP_CONFIG
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2575 * request to SIM */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2576 psaSIM_Bip_Config_Req();
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2577
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2578 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2579 case DTI_CONN_STATE_ERROR:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2580 /* connection not possible: disconnect UDP, L2R or TRA */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2581 TRACE_EVENT("SIM_ENT_CSDconnect_dti_cb connection not possible: disconnect UDP,L2R or TRA");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2582 dti_cntrl_close_dpath_from_dti_id( dti_id );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2583 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2584 case DTI_CONN_STATE_UNKNOWN:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2585 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2586 TRACE_EVENT("SIM_ENT_CSDconnect_dti_cb call with not awaited value");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2587 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2588 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2589 return TRUE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2590 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2591 #endif /* DTI */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2592
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2593 #if defined (GPRS) AND defined (DTI)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2594 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2595 +---------------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2596 | PROJECT : GSM-F&D (8411) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2597 | STATE : code ROUTINE : SIM_SNDCP_connect_dti_cb |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2598 +---------------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2599
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2600 PURPOSE : Callback for connection between SIM and SNDCP.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2601
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2602 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2603 GLOBAL BOOL SIM_SNDCP_connect_dti_cb(UBYTE dti_id, T_DTI_CONN_STATE result_type)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2604 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2605 TRACE_FUNCTION("SIM_SNDCP_connect_dti_cb");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2606
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2607 switch( result_type)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2608 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2609 case DTI_CONN_STATE_DISCONNECTING:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2610 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2611 case DTI_CONN_STATE_DISCONNECTED:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2612 dti_cntrl_erase_entry(dti_id);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2613 if (simShrdPrm.sat_class_e_dti_id EQ dti_id)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2614 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2615 simShrdPrm.sat_class_e_dti_id = DTI_DTI_ID_NOTPRESENT;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2616 TRACE_EVENT("sat_class_e_dti_id reset");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2617 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2618 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2619 case DTI_CONN_STATE_CONNECTING:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2620 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2621 case DTI_CONN_STATE_CONNECTED:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2622 /* the SIM-SNDCP connection has been established, now send SIM_BIP_CONFIG
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2623 * request to SIM */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2624 psaSIM_Bip_Config_Req();
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2625 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2626 case DTI_CONN_STATE_ERROR:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2627 /* connection not possible: disconnect SNDCP */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2628 dti_cntrl_close_dpath_from_dti_id( dti_id );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2629 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2630 case DTI_CONN_STATE_UNKNOWN:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2631 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2632 TRACE_EVENT("SIM_SNDCP_connect_dti_cb call with not awaited value");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2633 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2634 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2635 return TRUE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2636 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2637
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2638
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2639 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2640 +--------------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2641 | PROJECT : GSM-F&D (8411) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2642 | STATE : code ROUTINE : SIM_ENT_GPRSconnect_dti_cb|
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2643 +--------------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2644
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2645 PURPOSE : Callback for connection between SIM and UDP/SNDCP for GPRS.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2646
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2647 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2648
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2649 GLOBAL BOOL SIM_ENT_GPRSconnect_dti_cb(UBYTE dti_id, T_DTI_CONN_STATE result_type)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2650 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2651 TRACE_FUNCTION("SIM_ENT_GPRSconnect_dti_cb");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2652
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2653 switch( result_type)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2654 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2655 case DTI_CONN_STATE_DISCONNECTING:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2656 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2657 case DTI_CONN_STATE_DISCONNECTED:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2658 dti_cntrl_erase_entry(dti_id);
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2659 if (simShrdPrm.sat_class_e_dti_id EQ dti_id)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2660 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2661 simShrdPrm.sat_class_e_dti_id = DTI_DTI_ID_NOTPRESENT;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2662 TRACE_EVENT("sat_class_e_dti_id reset");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2663 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2664 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2665 case DTI_CONN_STATE_CONNECTING:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2666 case DTI_CONN_STATE_CONNECTED:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2667 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2668 case DTI_CONN_STATE_ERROR:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2669 /* connection not possible: disconnect UDP or SNDCP */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2670 TRACE_EVENT("SIM_ENT_GPRSconnect_dti_cb connection not possible: disconnect UDP or SNDCP");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2671 dti_cntrl_close_dpath_from_dti_id( dti_id );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2672 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2673 case DTI_CONN_STATE_UNKNOWN:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2674 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2675 TRACE_EVENT("SIM_ENT_GPRSconnect_dti_cb call with not awaited value");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2676 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2677 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2678 return TRUE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2679 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2680
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2681 #endif /* GPRS */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2682
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2683 #endif /* FF_SAT_E */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2684
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2685 #ifdef FF_DUAL_SIM
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2686
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2687 /*
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2688 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2689 | PROJECT : GSM-PS (6147) MODULE : CMH_SIMR |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2690 | ROUTINE : cmhSIM_SIMSelected |
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2691 +-------------------------------------------------------------------+
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2692
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2693 PURPOSE : Informs the upper layer the result of the SIM Selection process.
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2694
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2695 */
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2696 GLOBAL void cmhSIM_SIMSelected ( void )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2697 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2698 UBYTE cmdBuf;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2699 T_ACI_CME_ERR err;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2700
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2701 TRACE_FUNCTION("cmhSIM_SIMSelected()");
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2702
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2703 switch(simEntStat.curCmd)
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2704 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2705 case(AT_CMD_SIM):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2706
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2707 switch( simShrdPrm.rslt )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2708 {
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2709 case( SIM_NO_ERROR ):
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2710
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2711 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2712
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2713 R_AT( RAT_OK, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2714 ( AT_CMD_SIM );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2715 cmh_logRslt ( simEntStat.entOwn, RAT_OK, AT_CMD_SIM, -1, -1, -1 );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2716 return;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2717
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2718 default:
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2719 err = cmhSIM_GetCmeFromSim ( simShrdPrm.rslt );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2720 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2721 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2722
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2723 cmdBuf = simEntStat.curCmd;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2724 simEntStat.curCmd = AT_CMD_NONE;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2725
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2726 R_AT( RAT_CME, simEntStat.entOwn )
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2727 ( cmdBuf, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2728 cmh_logRslt ( simEntStat.entOwn, RAT_CME, cmdBuf,
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2729 -1, -1, err );
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2730 break;
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2731 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2732 }
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2733 #endif /*FF_DUAL_SIM*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2734
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2735 /*==== EOF ========================================================*/
93999a60b835 src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2736