24
|
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 __CVOICECALL_H__
|
|
22 |
#define __CVOICECALL_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 KVoiceCallScriptA[]= {
|
|
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*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut },
|
|
118 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
119 |
|
|
120 |
{ ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
|
|
121 |
{ ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
|
|
122 |
|
|
123 |
{ ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
|
|
124 |
{ ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
|
|
125 |
|
|
126 |
{ ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent },
|
|
127 |
{ ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
|
|
128 |
|
|
129 |
{ ERxString, (TText8*)"AT+CGATT", 0, ERxEvent },
|
|
130 |
{ ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
|
|
131 |
|
|
132 |
{ ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent },
|
|
133 |
{ ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut },
|
|
134 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
135 |
|
|
136 |
{ ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent },
|
|
137 |
{ 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 },
|
|
138 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
139 |
|
|
140 |
{ ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent },
|
|
141 |
{ ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut },
|
|
142 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
143 |
|
|
144 |
{ ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent },
|
|
145 |
{ ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
|
|
146 |
|
|
147 |
{ ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent },
|
|
148 |
{ ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
|
|
149 |
|
|
150 |
// Now simulate an outgoing and an incoming call when the behaving like an Ericsson 888
|
|
151 |
// so the iPhone will go "deaf" for a while after the "ATDxxxx", "OK" response
|
|
152 |
|
|
153 |
{ ERxString, (TText8*)"AT", 0, ERxEvent },
|
|
154 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
155 |
|
|
156 |
{ ERxString, (TText8*)"ATD+1234;", 0, ERxEvent },
|
|
157 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
158 |
|
|
159 |
// Mobile "Prod" removed corresponding to defect fix MIV-55LLFT for Ericsson devices
|
|
160 |
// { ERxString, (TText8*)"AT+", 0, ERxEvent },
|
|
161 |
// { ETxString, (TText8*)"ERROR", 0, ETxEvent|EFailIfTimeOut },
|
|
162 |
|
|
163 |
{ ERxString, (TText8*)"ATH", 0, ERxEvent },
|
|
164 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
165 |
|
|
166 |
//
|
|
167 |
// And now simulate an incoming call...
|
|
168 |
//
|
|
169 |
{ EWait, NULL, 4, ETimeOutEvent },
|
|
170 |
{ ETxString, (TText8*)"\r\n+CRING: VOICE\r\n", 0, ETxEvent|EFailIfTimeOut },
|
|
171 |
|
|
172 |
{ ERxString, (TText8*)"AT", 0, ERxEvent },
|
|
173 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
174 |
|
|
175 |
{ ERxString, (TText8*)"ATA", 0, ERxEvent },
|
|
176 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
177 |
|
|
178 |
{ ERxString, (TText8*)"AT+", 0, ERxEvent },
|
|
179 |
{ ETxString, (TText8*)"ERROR", 0, ETxEvent|EFailIfTimeOut },
|
|
180 |
|
|
181 |
{ ERxString, (TText8*)"ATH", 0, ERxEvent },
|
|
182 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
183 |
|
|
184 |
// This is just another quick "AT", "OK" sequence to check we're still alright
|
|
185 |
{ ERxString, (TText8*)"AT", 0, ERxEvent },
|
|
186 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
187 |
|
|
188 |
{ ERxString, (TText8*)"ATD+1234;", 0, ERxEvent },
|
|
189 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
190 |
|
|
191 |
// Mobile "Prod" removed corresponding to defect fix MIV-55LLFT for Ericsson devices
|
|
192 |
// { ERxString, (TText8*)"AT+", 0, ERxEvent },
|
|
193 |
// { ETxString, (TText8*)"ERROR", 0, ETxEvent|EFailIfTimeOut },
|
|
194 |
|
|
195 |
{ ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
|
|
196 |
{ ETxString, (TText8*)"+CSQ: 31,99", 0, ETxEvent|EFailIfTimeOut },
|
|
197 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
198 |
|
|
199 |
{ ERxString, (TText8*)"ATH", 0, ERxEvent },
|
|
200 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
201 |
|
|
202 |
{ ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
|
|
203 |
{ ETxString, (TText8*)"+CSQ: 31,99", 0, ETxEvent|EFailIfTimeOut },
|
|
204 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
205 |
|
|
206 |
//
|
|
207 |
// And now simulate an incoming call...
|
|
208 |
//
|
|
209 |
{ EWait, NULL, 4, ETimeOutEvent },
|
|
210 |
{ ETxString, (TText8*)"\r\n+CRING: VOICE\r\n", 0, ETxEvent|EFailIfTimeOut },
|
|
211 |
|
|
212 |
{ ERxString, (TText8*)"AT", 0, ERxEvent },
|
|
213 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
214 |
|
|
215 |
{ ERxString, (TText8*)"ATA", 0, ERxEvent },
|
|
216 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
217 |
|
|
218 |
{ ERxString, (TText8*)"AT+", 0, ERxEvent },
|
|
219 |
{ ETxString, (TText8*)"ERROR", 0, ETxEvent|EFailIfTimeOut },
|
|
220 |
|
|
221 |
{ ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
|
|
222 |
{ ETxString, (TText8*)"+CSQ: 31,99", 0, ETxEvent|EFailIfTimeOut },
|
|
223 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
224 |
|
|
225 |
{ ERxString, (TText8*)"ATH", 0, ERxEvent },
|
|
226 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
227 |
|
|
228 |
{ ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
|
|
229 |
{ ETxString, (TText8*)"+CSQ: 31,99", 0, ETxEvent|EFailIfTimeOut },
|
|
230 |
{ ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
|
|
231 |
|
|
232 |
{ EWait, NULL, 2, ETimeOutEvent },
|
|
233 |
{ EComplete, NULL, 0, 0 }
|
|
234 |
};
|
|
235 |
|
|
236 |
class CTestDriveVoiceCall : public CTestBase
|
|
237 |
{
|
|
238 |
public:
|
|
239 |
static CTestDriveVoiceCall* NewL(const TScriptList aScriptListEntry);
|
|
240 |
virtual TInt RunTestL();
|
|
241 |
|
|
242 |
protected:
|
|
243 |
virtual TInt DriveETelApiL();
|
|
244 |
|
|
245 |
private:
|
|
246 |
CTestDriveVoiceCall(const TScriptList aScriptListEntry);
|
|
247 |
TScriptList iScriptListEntry;
|
|
248 |
};
|
|
249 |
|
|
250 |
class CTestVoiceCall : public CATScriptEng
|
|
251 |
{
|
|
252 |
public:
|
|
253 |
static CTestVoiceCall* NewL(const TScript* aScript);
|
|
254 |
virtual void SpecificAlgorithmL(TInt aParam);
|
|
255 |
virtual void Complete(TInt aError);
|
|
256 |
virtual TInt Start();
|
|
257 |
|
|
258 |
private:
|
|
259 |
CTestVoiceCall(const TScript* aScript);
|
|
260 |
void ConstructL();
|
|
261 |
|
|
262 |
const TScript* iScript;
|
|
263 |
};
|
|
264 |
|
|
265 |
#endif
|