|
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 |
|
22 #ifndef __CNOCMGF_H__ |
|
23 #define __CNOCMGF_H__ |
|
24 |
|
25 #include "Te_LoopbackTestStepBase.h" |
|
26 #include "Te_LoopBackScriptEng.h" |
|
27 |
|
28 // |
|
29 // First a Script where everything is in order |
|
30 // |
|
31 const struct TScript KNoCMGFScript[]= { |
|
32 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
33 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
34 |
|
35 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
36 |
|
37 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
38 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
39 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
40 |
|
41 // |
|
42 // The initialisation string - we don't care what it is |
|
43 // |
|
44 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
45 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
46 |
|
47 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
48 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
49 |
|
50 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
51 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
52 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
53 |
|
54 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
55 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
56 |
|
57 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
58 { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut }, |
|
59 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
60 |
|
61 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
62 { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut }, |
|
63 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
64 |
|
65 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
66 { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut }, |
|
67 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
68 |
|
69 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
70 { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut }, |
|
71 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
72 |
|
73 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
74 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
75 |
|
76 // PDU mode not supported - return error to AT+CMGF command |
|
77 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
78 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
79 |
|
80 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
81 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
82 |
|
83 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
84 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
85 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
86 |
|
87 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
88 { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
89 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
90 |
|
91 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
92 { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
93 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
94 |
|
95 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
96 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
97 |
|
98 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
99 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
100 |
|
101 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
102 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
103 |
|
104 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
105 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
106 |
|
107 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
108 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
109 |
|
110 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
111 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
112 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
113 |
|
114 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
115 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
116 |
|
117 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
118 { ETxString, (TText8*)"ERROR\r", 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 // End of initialization sequence, |
|
151 |
|
152 { EWait, NULL, 2, ETimeOutEvent}, |
|
153 { EComplete, NULL, 0, 0 } |
|
154 }; |
|
155 |
|
156 class CTestDriveNoCmgf : public CTestBase |
|
157 { |
|
158 public: |
|
159 static CTestDriveNoCmgf* NewL(const TScriptList aScriptListEntry); |
|
160 virtual TInt RunTestL(); |
|
161 |
|
162 protected: |
|
163 virtual TInt DriveETelApiL(); |
|
164 |
|
165 private: |
|
166 CTestDriveNoCmgf(const TScriptList aScriptListEntry); |
|
167 |
|
168 RMobilePhone iCmgfPhone; |
|
169 TScriptList iScriptListEntry; |
|
170 }; |
|
171 |
|
172 class CTestNoCmgf : public CATScriptEng |
|
173 { |
|
174 public: |
|
175 static CTestNoCmgf* NewL(const TScript* aScript); |
|
176 virtual void SpecificAlgorithmL(TInt aParam); |
|
177 virtual void Complete(TInt aError); |
|
178 virtual TInt Start(); |
|
179 |
|
180 private: |
|
181 CTestNoCmgf(const TScript* aScript); |
|
182 void ConstructL(); |
|
183 |
|
184 const TScript* iScript; |
|
185 }; |
|
186 |
|
187 #endif |