|
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 // Test the TSY with a series of slightly strange modem initialisation responses |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 |
|
24 #ifndef __CODDINITS_H__ |
|
25 #define __CODDINITS_H__ |
|
26 |
|
27 #include "Te_LoopbackTestStepBase.h" |
|
28 #include "Te_LoopBackScriptEng.h" |
|
29 |
|
30 // |
|
31 // First a script with a strange +CNMI sequence |
|
32 // |
|
33 const struct TScript KOddInitAScript[]= { |
|
34 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
35 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
36 |
|
37 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
38 |
|
39 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
40 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
41 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
42 |
|
43 // |
|
44 // The initialisation string - we don't care what it is |
|
45 // |
|
46 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
47 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
48 |
|
49 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
50 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
51 |
|
52 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
53 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
54 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
55 |
|
56 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
57 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
58 |
|
59 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
60 { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut }, |
|
61 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
62 |
|
63 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
64 { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut }, |
|
65 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
66 |
|
67 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
68 { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut }, |
|
69 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
70 |
|
71 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
72 { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut }, |
|
73 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
74 |
|
75 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
76 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
77 |
|
78 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
79 { ETxString, (TText8*)"+CMGF: (0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
80 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
81 |
|
82 { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent }, |
|
83 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
84 |
|
85 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
86 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
87 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
88 |
|
89 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
90 { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
91 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
92 |
|
93 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
94 { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
95 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
96 |
|
97 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
98 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
99 |
|
100 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
101 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
102 |
|
103 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
104 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
105 |
|
106 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
107 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
108 |
|
109 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
110 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
111 |
|
112 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
113 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
114 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
115 |
|
116 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
117 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
118 |
|
119 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
120 { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut }, |
|
121 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
122 |
|
123 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
124 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
125 |
|
126 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
127 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
128 |
|
129 { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent }, |
|
130 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
131 |
|
132 { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent }, |
|
133 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
134 |
|
135 { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent }, |
|
136 { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
137 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
138 |
|
139 { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent }, |
|
140 { 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 }, |
|
141 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
142 |
|
143 { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent }, |
|
144 { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut }, |
|
145 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
146 |
|
147 { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent }, |
|
148 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
149 |
|
150 { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent }, |
|
151 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
152 |
|
153 // |
|
154 // In this case, the initialisation is all we care about. |
|
155 // |
|
156 { EWait, NULL, 2, ETimeOutEvent }, |
|
157 { EComplete, NULL, 0, 0 } |
|
158 }; |
|
159 |
|
160 // |
|
161 // Now a script with a truely bizarre +CNMI sequence |
|
162 // |
|
163 const struct TScript KOddInitBScript[]= { |
|
164 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
165 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
166 |
|
167 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
168 |
|
169 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
170 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
171 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
172 |
|
173 // |
|
174 // The initialisation string - we don't care what it is |
|
175 // |
|
176 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
177 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
178 |
|
179 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
180 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
181 |
|
182 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
183 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
184 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
185 |
|
186 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
187 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
188 |
|
189 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
190 { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut }, |
|
191 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
192 |
|
193 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
194 { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut }, |
|
195 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
196 |
|
197 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
198 { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut }, |
|
199 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
200 |
|
201 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
202 { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut }, |
|
203 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
204 |
|
205 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
206 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
207 |
|
208 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
209 { ETxString, (TText8*)"+CMGF: (0)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
210 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
211 |
|
212 { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent }, |
|
213 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
214 |
|
215 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
216 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
217 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
218 |
|
219 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
220 { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
221 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
222 |
|
223 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
224 { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
225 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
226 |
|
227 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
228 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
229 |
|
230 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
231 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
232 |
|
233 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
234 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
235 |
|
236 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
237 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
238 |
|
239 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
240 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
241 |
|
242 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
243 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
244 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
245 |
|
246 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
247 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
248 |
|
249 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
250 { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut }, |
|
251 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
252 |
|
253 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
254 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
255 |
|
256 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
257 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
258 |
|
259 { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent }, |
|
260 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
261 |
|
262 { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent }, |
|
263 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
264 |
|
265 { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent }, |
|
266 { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
267 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
268 |
|
269 { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent }, |
|
270 { 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 }, |
|
271 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
272 |
|
273 { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent }, |
|
274 { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut }, |
|
275 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
276 |
|
277 { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent }, |
|
278 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
279 |
|
280 { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent }, |
|
281 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
282 |
|
283 // |
|
284 // In this case, the initialisation is all we care about. |
|
285 // |
|
286 { EWait, NULL, 2, ETimeOutEvent }, |
|
287 { EComplete, NULL, 0, 0 } |
|
288 }; |
|
289 |
|
290 // |
|
291 // And another one that's designed to try and bring the parsing down... |
|
292 // |
|
293 const struct TScript KOddInitCScript[]= { |
|
294 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
295 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
296 |
|
297 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
298 |
|
299 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
300 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
301 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
302 |
|
303 // |
|
304 // The initialisation string - we don't care what it is |
|
305 // |
|
306 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
307 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
308 |
|
309 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
310 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
311 |
|
312 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
313 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
314 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
315 |
|
316 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
317 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
318 |
|
319 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
320 { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut }, |
|
321 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
322 |
|
323 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
324 { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut }, |
|
325 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
326 |
|
327 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
328 { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut }, |
|
329 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
330 |
|
331 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
332 { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut }, |
|
333 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
334 |
|
335 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
336 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
337 |
|
338 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
339 { ETxString, (TText8*)"+CMGF: (0)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
340 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
341 |
|
342 { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent }, |
|
343 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
344 |
|
345 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
346 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
347 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
348 |
|
349 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
350 { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
351 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
352 |
|
353 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
354 { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
355 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
356 |
|
357 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
358 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
359 |
|
360 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
361 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
362 |
|
363 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
364 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
365 |
|
366 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
367 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
368 |
|
369 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
370 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
371 |
|
372 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
373 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
374 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
375 |
|
376 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
377 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
378 |
|
379 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
380 { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut }, |
|
381 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
382 |
|
383 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
384 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
385 |
|
386 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
387 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
388 |
|
389 { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent }, |
|
390 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
391 |
|
392 { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent }, |
|
393 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
394 |
|
395 { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent }, |
|
396 { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
397 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
398 |
|
399 { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent }, |
|
400 { 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 }, |
|
401 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
402 |
|
403 { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent }, |
|
404 { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut }, |
|
405 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
406 |
|
407 { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent }, |
|
408 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
409 |
|
410 { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent }, |
|
411 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
412 |
|
413 // |
|
414 // In this case, the initialisation is all we care about. |
|
415 // |
|
416 { EWait, NULL, 2, ETimeOutEvent }, |
|
417 { EComplete, NULL, 0, 0 } |
|
418 }; |
|
419 |
|
420 // |
|
421 // ...And a further one that's designed to test the CNMI second parameter parsing. |
|
422 // |
|
423 const struct TScript KOddInitDScript[]= { |
|
424 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
425 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
426 |
|
427 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
428 |
|
429 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
430 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
431 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
432 |
|
433 // |
|
434 // The initialisation string - we don't care what it is |
|
435 // |
|
436 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
437 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
438 |
|
439 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
440 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
441 |
|
442 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
443 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
444 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
445 |
|
446 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
447 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
448 |
|
449 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
450 { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut }, |
|
451 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
452 |
|
453 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
454 { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut }, |
|
455 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
456 |
|
457 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
458 { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut }, |
|
459 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
460 |
|
461 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
462 { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut }, |
|
463 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
464 |
|
465 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
466 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
467 |
|
468 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
469 { ETxString, (TText8*)"+CMGF: (0)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
470 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
471 |
|
472 { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent }, |
|
473 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
474 |
|
475 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
476 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
477 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
478 |
|
479 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
480 { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
481 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
482 |
|
483 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
484 { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
485 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
486 |
|
487 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
488 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
489 |
|
490 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
491 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
492 |
|
493 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
494 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
495 |
|
496 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
497 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
498 |
|
499 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
500 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
501 |
|
502 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
503 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
504 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
505 |
|
506 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
507 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
508 |
|
509 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
510 { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut }, |
|
511 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
512 |
|
513 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
514 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
515 |
|
516 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
517 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
518 |
|
519 { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent }, |
|
520 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
521 |
|
522 { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent }, |
|
523 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
524 |
|
525 { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent }, |
|
526 { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
527 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
528 |
|
529 { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent }, |
|
530 { 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 }, |
|
531 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
532 |
|
533 { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent }, |
|
534 { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut }, |
|
535 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
536 |
|
537 { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent }, |
|
538 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
539 |
|
540 { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent }, |
|
541 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
542 |
|
543 // |
|
544 // In this case, the initialisation is all we care about. |
|
545 // |
|
546 { EWait, NULL, 2, ETimeOutEvent }, |
|
547 { EComplete, NULL, 0, 0 } |
|
548 }; |
|
549 |
|
550 // |
|
551 // This one has the Motorola Timeport's "000" response to AT+CMGF=? |
|
552 // and the curious lack of a space after the +CPMS:"SM"... response |
|
553 // |
|
554 const struct TScript KOddInitEScript[]= { |
|
555 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
556 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
557 |
|
558 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
559 |
|
560 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
561 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
562 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
563 |
|
564 // |
|
565 // The initialisation string - we don't care what it is |
|
566 // |
|
567 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
568 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
569 |
|
570 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
571 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
572 |
|
573 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
574 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
575 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
576 |
|
577 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
578 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
579 |
|
580 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
581 { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut }, |
|
582 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
583 |
|
584 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
585 { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut }, |
|
586 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
587 |
|
588 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
589 { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut }, |
|
590 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
591 |
|
592 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
593 { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut }, |
|
594 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
595 |
|
596 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
597 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
598 |
|
599 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
600 { ETxString, (TText8*)"+CMGF: 000\r", 0, ETxEvent|EFailIfTimeOut }, |
|
601 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
602 |
|
603 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
604 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
605 |
|
606 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
607 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
608 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
609 |
|
610 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
611 { ETxString, (TText8*)"+CPMS:\"SM\",001,015,\"SM\",001,015\r", 0, ETxEvent|EFailIfTimeOut }, |
|
612 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
613 |
|
614 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
615 { ETxString, (TText8*)"+CPMS:\"SM\",001,015,\"SM\",000,015\r", 0, ETxEvent|EFailIfTimeOut }, |
|
616 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
617 |
|
618 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
619 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
620 |
|
621 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
622 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
623 |
|
624 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
625 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
626 |
|
627 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
628 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
629 |
|
630 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
631 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
632 |
|
633 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
634 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
635 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
636 |
|
637 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
638 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
639 |
|
640 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
641 { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut }, |
|
642 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
643 |
|
644 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
645 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
646 |
|
647 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
648 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
649 |
|
650 { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent }, |
|
651 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
652 |
|
653 { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent }, |
|
654 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
655 |
|
656 { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent }, |
|
657 { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
658 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
659 |
|
660 { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent }, |
|
661 { 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 }, |
|
662 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
663 |
|
664 { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent }, |
|
665 { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut }, |
|
666 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
667 |
|
668 { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent }, |
|
669 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
670 |
|
671 { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent }, |
|
672 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
673 |
|
674 // |
|
675 // In this case, the initialisation is all we care about. |
|
676 // |
|
677 { EWait, NULL, 2, ETimeOutEvent }, |
|
678 { EComplete, NULL, 0, 0 } |
|
679 }; |
|
680 |
|
681 // |
|
682 // This one doesn't support SMS at all |
|
683 // |
|
684 const struct TScript KOddInitFScript[]= { |
|
685 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
686 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
687 |
|
688 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
689 |
|
690 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
691 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
692 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
693 |
|
694 // |
|
695 // The initialisation string - we don't care what it is |
|
696 // |
|
697 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
698 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
699 |
|
700 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
701 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
702 |
|
703 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
704 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
705 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
706 |
|
707 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
708 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
709 |
|
710 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
711 { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut }, |
|
712 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
713 |
|
714 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
715 { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut }, |
|
716 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
717 |
|
718 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
719 { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut }, |
|
720 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
721 |
|
722 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
723 { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut }, |
|
724 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
725 |
|
726 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
727 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
728 |
|
729 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
730 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
731 |
|
732 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
733 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
734 |
|
735 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
736 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
737 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
738 |
|
739 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
740 { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
741 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
742 |
|
743 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
744 { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
745 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
746 |
|
747 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
748 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
749 |
|
750 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
751 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
752 |
|
753 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
754 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
755 |
|
756 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
757 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
758 |
|
759 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
760 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
761 |
|
762 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
763 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
764 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
765 |
|
766 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
767 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
768 |
|
769 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
770 { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut }, |
|
771 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
772 |
|
773 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
774 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
775 |
|
776 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
777 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
778 |
|
779 { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent }, |
|
780 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
781 |
|
782 { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent }, |
|
783 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
784 |
|
785 { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent }, |
|
786 { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
787 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
788 |
|
789 { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent }, |
|
790 { 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 }, |
|
791 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
792 |
|
793 { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent }, |
|
794 { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut }, |
|
795 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
796 |
|
797 { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent }, |
|
798 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
799 |
|
800 { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent }, |
|
801 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
802 |
|
803 // |
|
804 // In this case, the initialisation is all we care about. |
|
805 // |
|
806 { EWait, NULL, 2, ETimeOutEvent }, |
|
807 { EComplete, NULL, 0, 0 } |
|
808 }; |
|
809 |
|
810 // |
|
811 // And this one does support SMS, but only text mode - it behaves like a Nokia 9110 |
|
812 // |
|
813 const struct TScript KOddInitGScript[]= { |
|
814 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
815 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
816 |
|
817 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
818 |
|
819 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
820 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
821 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
822 |
|
823 // |
|
824 // The initialisation string - we don't care what it is |
|
825 // |
|
826 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
827 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
828 |
|
829 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
830 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
831 |
|
832 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
833 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
834 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
835 |
|
836 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
837 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
838 |
|
839 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
840 { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut }, |
|
841 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
842 |
|
843 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
844 { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut }, |
|
845 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
846 |
|
847 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
848 { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut }, |
|
849 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
850 |
|
851 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
852 { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut }, |
|
853 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
854 |
|
855 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
856 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
857 |
|
858 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
859 { ETxString, (TText8*)"+CMGF: (1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
860 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
861 |
|
862 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
863 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
864 |
|
865 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
866 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
867 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
868 |
|
869 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
870 { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
871 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
872 |
|
873 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
874 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
875 |
|
876 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
877 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
878 |
|
879 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
880 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
881 |
|
882 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
883 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
884 |
|
885 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
886 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
887 |
|
888 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
889 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
890 |
|
891 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
892 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
893 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
894 |
|
895 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
896 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
897 |
|
898 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
899 { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut }, |
|
900 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
901 |
|
902 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
903 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
904 |
|
905 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
906 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
907 |
|
908 { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent }, |
|
909 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
910 |
|
911 { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent }, |
|
912 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
913 |
|
914 { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent }, |
|
915 { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
916 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
917 |
|
918 { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent }, |
|
919 { 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 }, |
|
920 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
921 |
|
922 { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent }, |
|
923 { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut }, |
|
924 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
925 |
|
926 { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent }, |
|
927 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
928 |
|
929 { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent }, |
|
930 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
931 |
|
932 // |
|
933 // In this case, the initialisation is all we care about. |
|
934 // |
|
935 { EWait, NULL, 2, ETimeOutEvent }, |
|
936 { EComplete, NULL, 0, 0 } |
|
937 }; |
|
938 |
|
939 |
|
940 // |
|
941 // A script simulating an Ericsson with a strange +CNMI sequence, plus returning very long +CG?? reponses |
|
942 // |
|
943 const struct TScript KOddInitHScript[]= { |
|
944 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
945 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
946 |
|
947 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
948 |
|
949 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
950 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
951 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
952 |
|
953 // |
|
954 // The initialisation string - we don't care what it is |
|
955 // |
|
956 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
957 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
958 |
|
959 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
960 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
961 |
|
962 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
963 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
964 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
965 |
|
966 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
967 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
968 |
|
969 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
970 { ETxString, (TText8*)"ERICSSONABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ\r", 0, ETxEvent|EFailIfTimeOut }, |
|
971 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
972 |
|
973 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
974 { ETxString, (TText8*)"123456789101234567891012345678920123456789301234567894012345678950123456789601234567870\r", 0, ETxEvent|EFailIfTimeOut }, |
|
975 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
976 |
|
977 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
978 { ETxString, (TText8*)"123456789101234567891012345678920123456789301234567894012345678950123456789601234567870\r", 0, ETxEvent|EFailIfTimeOut }, |
|
979 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
980 |
|
981 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
982 { ETxString, (TText8*)"123456789101234567891012345678920123456789301234567894012345678950123456789601234567870\r", 0, ETxEvent|EFailIfTimeOut }, |
|
983 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
984 |
|
985 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
986 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
987 |
|
988 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
989 { ETxString, (TText8*)"+CMGF: (0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
990 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
991 |
|
992 { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent }, |
|
993 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
994 |
|
995 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
996 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
997 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
998 |
|
999 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
1000 { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1001 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1002 |
|
1003 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
1004 { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1005 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1006 |
|
1007 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
1008 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1009 |
|
1010 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
1011 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1012 |
|
1013 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
1014 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1015 |
|
1016 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
1017 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1018 |
|
1019 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
1020 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1021 |
|
1022 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
1023 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1024 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1025 |
|
1026 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
1027 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1028 |
|
1029 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
1030 { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut }, |
|
1031 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1032 |
|
1033 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
1034 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1035 |
|
1036 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
1037 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1038 |
|
1039 { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent }, |
|
1040 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1041 |
|
1042 { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent }, |
|
1043 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1044 |
|
1045 { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent }, |
|
1046 { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1047 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1048 |
|
1049 { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent }, |
|
1050 { 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 }, |
|
1051 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1052 |
|
1053 { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent }, |
|
1054 { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut }, |
|
1055 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1056 |
|
1057 { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent }, |
|
1058 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1059 |
|
1060 { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent }, |
|
1061 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1062 |
|
1063 // |
|
1064 // In this case, the initialisation is all we care about. |
|
1065 // |
|
1066 { EWait, NULL, 2, ETimeOutEvent }, |
|
1067 { EComplete, NULL, 0, 0 } |
|
1068 }; |
|
1069 |
|
1070 //Nokia style init with 50+ character +CG?? responses |
|
1071 const struct TScript KOddInitIScript[]= { |
|
1072 { ERxString, (TText8*)"AT\r", 0, ERxEvent }, |
|
1073 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1074 |
|
1075 { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 }, |
|
1076 |
|
1077 { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent }, |
|
1078 { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1079 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1080 |
|
1081 // |
|
1082 // The initialisation string - we don't care what it is |
|
1083 // |
|
1084 { ERxString, (TText8*)"AT", 0, ERxEvent }, |
|
1085 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1086 |
|
1087 { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent }, |
|
1088 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1089 |
|
1090 { ERxString, (TText8*)"ATS7?", 0, ERxEvent }, |
|
1091 { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1092 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1093 |
|
1094 { ERxString, (TText8*)"ATS0=0", 0, ERxEvent }, |
|
1095 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1096 |
|
1097 { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent }, |
|
1098 { ETxString, (TText8*)"ABCDEFGHIJKLMNOPRSTUVWXYZABCDEFGHIJKLMNOPRSTUVWXYZABCDEFGHIJKLMNOPRSTUVWXYZ\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1099 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1100 |
|
1101 { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent }, |
|
1102 { ETxString, (TText8*)"12345678901234567890123456789012345678901234567890123456789012345678901234567890\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1103 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1104 |
|
1105 { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent }, |
|
1106 { ETxString, (TText8*)"12345678901234567890123456789012345678901234567890123456789012345678901234567890\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1107 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1108 |
|
1109 { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent }, |
|
1110 { ETxString, (TText8*)"12345678901234567890123456789012345678901234567890123456789012345678901234567890\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1111 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1112 |
|
1113 { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent }, |
|
1114 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1115 |
|
1116 { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent }, |
|
1117 { ETxString, (TText8*)"+CMGF: (0)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1118 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1119 |
|
1120 { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent }, |
|
1121 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1122 |
|
1123 { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent }, |
|
1124 { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1125 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1126 |
|
1127 { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent }, |
|
1128 { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1129 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1130 |
|
1131 { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent }, |
|
1132 { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1133 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1134 |
|
1135 { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent }, |
|
1136 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1137 |
|
1138 { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent }, |
|
1139 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1140 |
|
1141 { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent }, |
|
1142 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1143 |
|
1144 { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent }, |
|
1145 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1146 |
|
1147 { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent }, |
|
1148 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1149 |
|
1150 { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent }, |
|
1151 { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1152 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1153 |
|
1154 { ERxString, (TText8*)"AT+CBC", 0, ERxEvent }, |
|
1155 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1156 |
|
1157 { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent }, |
|
1158 { ETxString, (TText8*)"+CSQ: 31,99\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1159 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1160 |
|
1161 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
1162 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1163 |
|
1164 { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent }, |
|
1165 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1166 |
|
1167 { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent }, |
|
1168 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1169 |
|
1170 { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent }, |
|
1171 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1172 |
|
1173 // Init Done |
|
1174 |
|
1175 { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent }, |
|
1176 { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1177 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1178 |
|
1179 { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent }, |
|
1180 { 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 }, |
|
1181 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1182 |
|
1183 { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent }, |
|
1184 { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut }, |
|
1185 { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut }, |
|
1186 |
|
1187 { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent }, |
|
1188 { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut }, |
|
1189 |
|
1190 |
|
1191 // Init Done |
|
1192 |
|
1193 { EWait, NULL, 1, ETimeOutEvent }, |
|
1194 { EComplete, NULL, 0, 0 } |
|
1195 }; |
|
1196 |
|
1197 |
|
1198 class CTestDriveOddInit : public CTestBase |
|
1199 { |
|
1200 public: |
|
1201 static CTestDriveOddInit* NewL(const TScriptList aScriptListEntry); |
|
1202 ~CTestDriveOddInit(); |
|
1203 virtual TInt RunTestL(); |
|
1204 |
|
1205 protected: |
|
1206 virtual TInt DriveETelApiL(); |
|
1207 |
|
1208 private: |
|
1209 CTestDriveOddInit(const TScriptList aScriptListEntry); |
|
1210 |
|
1211 TScriptList iScriptListEntry; |
|
1212 }; |
|
1213 |
|
1214 |
|
1215 class CTestOddInit : public CATScriptEng |
|
1216 { |
|
1217 public: |
|
1218 static CTestOddInit* NewL(const TScript* aScript); |
|
1219 ~CTestOddInit(); |
|
1220 |
|
1221 virtual void SpecificAlgorithmL(TInt aParam); |
|
1222 virtual void Complete(TInt aError); |
|
1223 virtual TInt Start(); |
|
1224 |
|
1225 private: |
|
1226 CTestOddInit(const TScript* aScript); |
|
1227 void ConstructL(); |
|
1228 |
|
1229 const TScript* iScript; |
|
1230 }; |
|
1231 |
|
1232 #endif |