I am trying to use this GSM library for a GSM module (Siemens), although the library was developed for Telit modules, I think this is not a problem, beacuse both use AT commands.
Library = 404 Error
After importing the library I try to compile the examples. Both example, SMS and GPRS, return the same error when compiling.
Error = Serial3 was not declared in this scope.
Code follows (beginning of the SMS example from the library):
#include <gsmSMS.h> //You just need to import the gsmSMS.h file if you are just doing SMS message
//PIN DEFS****
#define turnOnPin 40 //used to turn on off Telit
//**************************
//FUNC DEFS*****
bool readDeleteMessages(); // Used to read any received messages and then deletes them
bool checkNetworkSendMessage(); // Used to check if your on the network and then sends SMS
void talkReply(); // Used to send commands directly to the Telit and trigger the above functions
//**************************
//make a object of Gsm class************
/First you have to make the gsmSMS object, the arguments are in order
GsmSMS (#1 Name of the serial port connected to GSM (your choice),#2 the address of millis function(just copy whats there) )/
gsmSMS myGsmSMS(Serial3,&millis,&Serial); //gsmSMS TELIT SMS
//*****************************************************
void setup(){
Serial.begin(9600); // used for debugging
**Serial3.begin(9600); ** // used for talking to telit
Serial.println("hello"); // say hello to check serial line
.....
And here is the class in the file (library) gsmSMS.h
class gsmSMS : virtual public GSMbase
{
//FULL FUNC DESCRIPTION IN SOURCE\
private:
char* messageList;
public:
gsmSMS(Serial&, uint32_t(FP)(), Serial = NULL);
inline const char* const getMessageList(){return messageList;}
////////////////////////////INIT FUNC
virtual bool init(uint16_t); //INITS, CALLS BASE INIT
bool smsInit(); //called in init, for derived class
////////////////////////////SEND FUNC
bool sendNoSaveCMGS(const char*,const char*); //Send message no save
const char* const saveMessageCMGW(const char*,const char*); //Send to memory
bool sendSavedMessageCMSS(const char * const); //Send from memory
///////////////////////////LIST MESSAGE FUNC
const char* const getNumMesInMemCPMS(uint16_t); //Gets # mes
const char* const checkCMGDList(); //Gets a # list of all avail mes
///////////////////////////READ FUNCS
const char* const readMessageCMGR(const char* const); //Reads specified mes
const char* const readAllCMGL(const char* const, uint16_t _dataSize=300); //Reads all mes of type
///////////////////////////DELETE FUNCS
bool deletMessagesCMGD(const char* const); //Deletes mes
////OPTIONAL SEE BELOW************
//const char* const checkCSCA();
//bool setCSCA(const char* theNumber);
//****************************************
};
any help... why Serial3 is not defined?
Thanks in advance.