--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telephonyserverplugins/multimodetsy/test/Te_LoopBack/Te_LoopBackcoddinits.h Tue Feb 02 01:41:59 2010 +0200
@@ -0,0 +1,1232 @@
+// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Test the TSY with a series of slightly strange modem initialisation responses
+//
+//
+
+/**
+ @file
+ @internalComponent
+*/
+
+
+#ifndef __CODDINITS_H__
+#define __CODDINITS_H__
+
+#include "Te_LoopbackTestStepBase.h"
+#include "Te_LoopBackScriptEng.h"
+
+//
+// First a script with a strange +CNMI sequence
+//
+const struct TScript KOddInitAScript[]= {
+ { ERxString, (TText8*)"AT\r", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 },
+
+ { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+//
+// The initialisation string - we don't care what it is
+//
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS7?", 0, ERxEvent },
+ { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS0=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent },
+ { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent },
+ { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent },
+ { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CMGF: (0,1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBC", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent },
+ { 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 },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+//
+// In this case, the initialisation is all we care about.
+//
+ { EWait, NULL, 2, ETimeOutEvent },
+ { EComplete, NULL, 0, 0 }
+ };
+
+//
+// Now a script with a truely bizarre +CNMI sequence
+//
+const struct TScript KOddInitBScript[]= {
+ { ERxString, (TText8*)"AT\r", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 },
+
+ { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+//
+// The initialisation string - we don't care what it is
+//
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS7?", 0, ERxEvent },
+ { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS0=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent },
+ { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent },
+ { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent },
+ { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CMGF: (0)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBC", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent },
+ { 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 },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+//
+// In this case, the initialisation is all we care about.
+//
+ { EWait, NULL, 2, ETimeOutEvent },
+ { EComplete, NULL, 0, 0 }
+ };
+
+//
+// And another one that's designed to try and bring the parsing down...
+//
+const struct TScript KOddInitCScript[]= {
+ { ERxString, (TText8*)"AT\r", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 },
+
+ { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+//
+// The initialisation string - we don't care what it is
+//
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS7?", 0, ERxEvent },
+ { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS0=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent },
+ { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent },
+ { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent },
+ { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CMGF: (0)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBC", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent },
+ { 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 },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+//
+// In this case, the initialisation is all we care about.
+//
+ { EWait, NULL, 2, ETimeOutEvent },
+ { EComplete, NULL, 0, 0 }
+ };
+
+//
+// ...And a further one that's designed to test the CNMI second parameter parsing.
+//
+const struct TScript KOddInitDScript[]= {
+ { ERxString, (TText8*)"AT\r", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 },
+
+ { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+//
+// The initialisation string - we don't care what it is
+//
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS7?", 0, ERxEvent },
+ { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS0=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent },
+ { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent },
+ { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent },
+ { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CMGF: (0)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBC", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent },
+ { 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 },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+//
+// In this case, the initialisation is all we care about.
+//
+ { EWait, NULL, 2, ETimeOutEvent },
+ { EComplete, NULL, 0, 0 }
+ };
+
+//
+// This one has the Motorola Timeport's "000" response to AT+CMGF=?
+// and the curious lack of a space after the +CPMS:"SM"... response
+//
+const struct TScript KOddInitEScript[]= {
+ { ERxString, (TText8*)"AT\r", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 },
+
+ { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+//
+// The initialisation string - we don't care what it is
+//
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS7?", 0, ERxEvent },
+ { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS0=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent },
+ { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent },
+ { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent },
+ { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CMGF: 000\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS:\"SM\",001,015,\"SM\",001,015\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS:\"SM\",001,015,\"SM\",000,015\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBC", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent },
+ { 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 },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+//
+// In this case, the initialisation is all we care about.
+//
+ { EWait, NULL, 2, ETimeOutEvent },
+ { EComplete, NULL, 0, 0 }
+ };
+
+//
+// This one doesn't support SMS at all
+//
+const struct TScript KOddInitFScript[]= {
+ { ERxString, (TText8*)"AT\r", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 },
+
+ { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+//
+// The initialisation string - we don't care what it is
+//
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS7?", 0, ERxEvent },
+ { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS0=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent },
+ { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent },
+ { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent },
+ { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBC", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent },
+ { 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 },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+//
+// In this case, the initialisation is all we care about.
+//
+ { EWait, NULL, 2, ETimeOutEvent },
+ { EComplete, NULL, 0, 0 }
+ };
+
+//
+// And this one does support SMS, but only text mode - it behaves like a Nokia 9110
+//
+const struct TScript KOddInitGScript[]= {
+ { ERxString, (TText8*)"AT\r", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 },
+
+ { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+//
+// The initialisation string - we don't care what it is
+//
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS7?", 0, ERxEvent },
+ { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS0=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERICSSON\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent },
+ { ETxString, (TText8*)"1100801\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent },
+ { ETxString, (TText8*)"9808261341\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent },
+ { ETxString, (TText8*)"520002512954000\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CMGF: (1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBC", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent },
+ { 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 },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+//
+// In this case, the initialisation is all we care about.
+//
+ { EWait, NULL, 2, ETimeOutEvent },
+ { EComplete, NULL, 0, 0 }
+ };
+
+
+//
+// A script simulating an Ericsson with a strange +CNMI sequence, plus returning very long +CG?? reponses
+//
+const struct TScript KOddInitHScript[]= {
+ { ERxString, (TText8*)"AT\r", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 },
+
+ { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+//
+// The initialisation string - we don't care what it is
+//
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS7?", 0, ERxEvent },
+ { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS0=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERICSSONABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent },
+ { ETxString, (TText8*)"123456789101234567891012345678920123456789301234567894012345678950123456789601234567870\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent },
+ { ETxString, (TText8*)"123456789101234567891012345678920123456789301234567894012345678950123456789601234567870\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent },
+ { ETxString, (TText8*)"123456789101234567891012345678920123456789301234567894012345678950123456789601234567870\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CMGF: (0,1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBC", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSQ: 15,99\r",0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent },
+ { 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 },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT*ECAM=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+//
+// In this case, the initialisation is all we care about.
+//
+ { EWait, NULL, 2, ETimeOutEvent },
+ { EComplete, NULL, 0, 0 }
+ };
+
+//Nokia style init with 50+ character +CG?? responses
+const struct TScript KOddInitIScript[]= {
+ { ERxString, (TText8*)"AT\r", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { EIfRxStringJmp, (TText8*)"AT\r", 1, 0 },
+
+ { ERxString, (TText8*)"AT+FCLASS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"0,1,2\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+//
+// The initialisation string - we don't care what it is
+//
+ { ERxString, (TText8*)"AT", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CNMI=,0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS7?", 0, ERxEvent },
+ { ETxString, (TText8*)"050\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"ATS0=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ABCDEFGHIJKLMNOPRSTUVWXYZABCDEFGHIJKLMNOPRSTUVWXYZABCDEFGHIJKLMNOPRSTUVWXYZ\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMM", 0, ERxEvent },
+ { ETxString, (TText8*)"12345678901234567890123456789012345678901234567890123456789012345678901234567890\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGMR", 0, ERxEvent },
+ { ETxString, (TText8*)"12345678901234567890123456789012345678901234567890123456789012345678901234567890\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGSN", 0, ERxEvent },
+ { ETxString, (TText8*)"12345678901234567890123456789012345678901234567890123456789012345678901234567890\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CIMI", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CMGF: (0)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CMGF=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: (\"ME\",\"SM\"),(\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPMS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPMS: \"SM\",0,15,\"SM\",0,15\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CPBS=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CPBS: (\"ME\",\"SM\")\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=0", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=2", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CREG?", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CRC=1", 0, ERxEvent },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+COPS?", 0, ERxEvent },
+ { ETxString, (TText8*)"+COPS: 0,0,\"UK VODAFONE\"\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBC", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSQ", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSQ: 31,99\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGCLASS", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGQREQ", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGATT", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+// Init Done
+
+ { ERxString, (TText8*)"AT+CNMI=?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CNMI: (0-2),(0,1,3),(0),(0),(0,1)\r", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CBST=?", 0, ERxEvent },
+ { 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 },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CSCA?", 0, ERxEvent },
+ { ETxString, (TText8*)"+CSCA: \"441632960000\",145", 0, ETxEvent|EFailIfTimeOut },
+ { ETxStringOK, NULL, 0, ETxEvent|EFailIfTimeOut },
+
+ { ERxString, (TText8*)"AT+CGREG=1", 0, ERxEvent },
+ { ETxString, (TText8*)"ERROR\r", 0, ETxEvent|EFailIfTimeOut },
+
+
+// Init Done
+
+ { EWait, NULL, 1, ETimeOutEvent },
+ { EComplete, NULL, 0, 0 }
+ };
+
+
+class CTestDriveOddInit : public CTestBase
+ {
+ public:
+ static CTestDriveOddInit* NewL(const TScriptList aScriptListEntry);
+ ~CTestDriveOddInit();
+ virtual TInt RunTestL();
+
+ protected:
+ virtual TInt DriveETelApiL();
+
+ private:
+ CTestDriveOddInit(const TScriptList aScriptListEntry);
+
+ TScriptList iScriptListEntry;
+ };
+
+
+class CTestOddInit : public CATScriptEng
+ {
+ public:
+ static CTestOddInit* NewL(const TScript* aScript);
+ ~CTestOddInit();
+
+ virtual void SpecificAlgorithmL(TInt aParam);
+ virtual void Complete(TInt aError);
+ virtual TInt Start();
+
+ private:
+ CTestOddInit(const TScript* aScript);
+ void ConstructL();
+
+ const TScript* iScript;
+ };
+
+#endif