|
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #ifndef CNOCNMI_H__ |
|
22 #define CNOCNMI_H__ |
|
23 |
|
24 #include "Te_LoopbackTestStepBase.h" |
|
25 #include "Te_LoopBackScriptEng.h" |
|
26 |
|
27 // |
|
28 // First a Script where everything is in order |
|
29 // |
|
30 const struct TScript KNoCnmiScript[]= { |
|
31 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
32 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
33 |
|
34 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
35 |
|
36 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
37 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
38 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
39 |
|
40 // |
|
41 // The initialisation string - we don't care what it is |
|
42 // |
|
43 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
44 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
45 |
|
46 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
47 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
48 |
|
49 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
50 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
51 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
52 |
|
53 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
54 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
55 |
|
56 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
57 { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut }, |
|
58 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
59 |
|
60 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
61 { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut }, |
|
62 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
63 |
|
64 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
65 { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut }, |
|
66 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
67 |
|
68 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
69 { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut }, |
|
70 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
71 |
|
72 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
73 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
74 |
|
75 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
76 { ETxString, (TText8*)"+CMGF: (0)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
77 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
78 |
|
79 { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent }, |
|
80 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
81 |
|
82 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
83 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
84 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
85 |
|
86 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
87 { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
88 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
89 |
|
90 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
91 { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
92 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
93 |
|
94 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
95 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
96 |
|
97 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
98 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
99 |
|
100 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
101 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
102 |
|
103 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
104 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
105 |
|
106 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
107 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
108 |
|
109 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
110 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
111 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
112 |
|
113 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
114 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
115 |
|
116 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
117 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
118 |
|
119 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
120 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
121 |
|
122 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
123 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
124 |
|
125 { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent }, |
|
126 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
127 |
|
128 { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent }, |
|
129 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
130 |
|
131 { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent }, |
|
132 { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
133 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
134 |
|
135 { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent }, |
|
136 { ETxString, (TText8*)"+CBST: (0-7,12,14-16,34,36,38,39,43,47-51,65,66,68,70,71,75,79-81),(0,2),(1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
137 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
138 |
|
139 { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent }, |
|
140 { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut }, |
|
141 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
142 |
|
143 { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent }, |
|
144 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
145 |
|
146 { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent }, |
|
147 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
148 |
|
149 // End of initialization sequence, |
|
150 |
|
151 // Establish a voice call. Incoming call indication |
|
152 { EWait, NULL, 5, ETimeOutEvent}, |
|
153 { ETxString, (TText8*)"\r\n+CRING: VOICE\r\n", 0, ETxEvent|EFailIfTimeOut }, |
|
154 |
|
155 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
156 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
157 |
|
158 // Answer incoming call |
|
159 { ERxString, (TText8*)"ATA", 0, ERxEvent }, |
|
160 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
161 |
|
162 { ERxString, (TText8*)"AT+", 0, ERxEvent }, |
|
163 { ETxString, (TText8*)"ERROR", 0, ETxEvent|EFailIfTimeOut }, |
|
164 |
|
165 { ERxString, (TText8*)"ATH", 0, ERxEvent }, |
|
166 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
167 |
|
168 { EWait, NULL, 5, ETimeOutEvent}, |
|
169 { EComplete, NULL, 0, 0 } |
|
170 }; |
|
171 |
|
172 class CTestDriveNoCnmi : public CTestBase |
|
173 { |
|
174 public: |
|
175 static CTestDriveNoCnmi* NewL(const TScriptList aScriptListEntry); |
|
176 virtual TInt RunTestL(); |
|
177 |
|
178 protected: |
|
179 virtual TInt DriveETelApiL(); |
|
180 |
|
181 private: |
|
182 CTestDriveNoCnmi(const TScriptList aScriptListEntry); |
|
183 |
|
184 RMobilePhone iCnPhone; |
|
185 TScriptList iScriptListEntry; |
|
186 }; |
|
187 |
|
188 class CTestNoCnmi : public CATScriptEng |
|
189 { |
|
190 public: |
|
191 static CTestNoCnmi* NewL(const TScript* aScript); |
|
192 virtual void SpecificAlgorithmL(TInt aParam); |
|
193 virtual void Complete(TInt aError); |
|
194 virtual TInt Start(); |
|
195 |
|
196 private: |
|
197 CTestNoCnmi(const TScript* aScript); |
|
198 void ConstructL(); |
|
199 |
|
200 const TScript* iScript; |
|
201 }; |
|
202 |
|
203 #endif |