GSM SHIELD ISSUE

Hello

I recently purchased a gsm shield this one. http://www.ebay.co.uk/itm/GSM-GPRS-Shield-For-Arduino-/230911052682?pt=LH_DefaultDomain_0&hash=item35c35f0b8a

At the bottom is the code for the page is the code for project. The instructions say you should edit the GSM.cpp to the rx and tx pin of your arduino save and compile the file.

I am having problem compiling the GSM.cpp file. The file has GSM.h file that has an include SoftwareSerial.cpp.

Compiling GSM.cpp result in a directory file not found for GSM.h pointing at the SoftwareSerial.cpp.

Has any one worked with this shield using arduino uno.

Thanks.

Do you need to compile the .cpp file ? It will be compiled into your project automatically. What would be the point of compiling it separately ?

Hi Thanks for reply.

At the bottom of this is a link to the module I am using and if you scroll down the test code link downloads the code I am using.

http://www.ebay.co.uk/itm/GSM-GPRS-Shield-For-Arduino-/230911052682?pt=LH_DefaultDomain_0&hash=item35c35f0b8a

The instruction say I should compile GSM.cpp after editing the rx and tx pins.

Hope you can help.

The instruction say I should compile GSM.cpp after editing the rx and tx pins.

Once you've edited the code, no matter how little, it no longer matches what I would download. At that point, you need to quit beating around the bush and post YOUR code.

Compiling GSM.cpp result in a directory file not found for GSM.h pointing at the SoftwareSerial.cpp.

I'm sure that the compiler provided way more information than what you have clearly incorrectly summarized here. Don't try to summarize what the compiler is telling you. Post the EXACT output of the compiler.

Hi Thanks for reply. This is the GSM.cpp code. I have upload some of it. They is a limit to the character upload on the forum.

The only changes I made are to the rx and tx because the uno that has rx on pin 0 and tx on pin 1. After saving the changes and can`t compile the file.

GSM.cpp :

/* This is a Beta version. last modified 18/08/2012.

This library is based on one developed by Arduino Labs and it is modified to preserve the compability with the Arduino's product.

The library is modified to use the GSM Shield, developed by www.open-electronics.org (http://www.open-electronics.org/arduino-gsm-shield/) and based on SIM900 chip, with the same commands of Arduino Shield, based on QuectelM10 chip. */

include "GSM.h"

include "WideTextFinder.h"

//De-comment this two lines below if you have the //first version of GSM GPRS Shield //#define GSM_TXPIN 4 //#define GSM_RXPIN 5

//De-comment this two lines below if you have the //second version og GSM GPRS Shield

define GSM_TXPIN 1

define GSM_RXPIN 0

ifdef UNO

GSM::GSM():cell(_GSM_TXPIN,GSM_RXPIN),_tf(_cell, 10),_status(IDLE){ };

endif

ifdef MEGA

GSM::GSM(){ _cell.begin(9600); };

endif

This is just some of the output.

output:

17 C:\Users\Frazer2011\Documents\Arduino\libraries\GSMSHIELD\GSM.cpp In file included from C:\Users\Frazer2011\Documents\Arduino\libraries\GSMSHIELD\GSM.cpp

\Users\Frazer2011\Documents\Arduino\libraries\GSMSHIELD\/GSM.h C:\Users\Frazer2011\Documents\Arduino\libraries\GSMSHIELD\C SoftSerial.h: No such file or directory.

17 C:\Users\Frazer2011\Documents\Arduino\libraries\GSMSHIELD\GSM.h:9, from C:\Users\Frazer2011\Documents\Arduino\libraries\GSMSHIELD\GSM.cpp In file included from C:\Users\Frazer2011\Documents\Arduino\libraries\GSMSHIELD\/GSM.h:9, from C:\Users\Frazer2011\Documents\Arduino\libraries\GSMSHIELD\GSM.cpp

17 C:\Users\Frazer2011\Documents\Arduino\libraries\GSMSHIELD\GSM.cpp from C:\Users\Frazer2011\Documents\Arduino\libraries\GSMSHIELD\GSM.cpp

Hope you can help.

The instruction say I should compile GSM.cpp after editing the rx and tx pins.

No its doesn't. It says

Save and compile

It is referring to compiling your program, not the .cpp file.

Hi okay thanks. So the issue is not to do with compiling GSM.cpp.

So on my Arduino rx is 0 and tx is 1. I make the appropriate changes and have external power of 9v as highlight by instructions but for some reason I can not successfully get the module to run example code.

Hope you have some idea on how I can solve issue thanks.

Here are instructions: Library created by:

Marco Martines

martines[ dot ]marco[ at ]gmail[ dot ]com


[1] How to switch between Arduino Mega and Arduino Uno?

1) Open GSM.h and comment-decomment the appropriate lines like below e.g. for Arduino Mega //#define UNO

define MEGA

2) If you use Arduino Uno comment the line in HWSerial.h or decomment if you are using Arduino Mega e.g. for Arduino Mega

define MEGA

3) Save and compile

[2] How to switch between the old shield (that uses 4 and 5 pins for SoftwareSerial and the new (that used 2 and 3 pins)?

1) Open GSM.cpp and comment-decomment the appropriate lines like below e.g. for the new one

//#define GSM_TXPIN 4 //#define GSM_RXPIN 5

define GSM_TXPIN 2

define GSM_RXPIN 3

2) Save and compile

[3] My shield doesn't work. Why?

Check this steps and then ask for support on the issues' page on google code.

1) SIM900 and SIM908 require about 1 A during the hardest tasks. You should have an external power source that can provide about 1 A at 8-12 V

2) If the SIM90X blinks (1 Hz) for some seconds and then turn off, probably it's a communication's problem. Check the switch/jumpers for Serial communication.

3) Arduino Uno has 2 KB of RAM. Library takes about 80% (we are working to reduce it), if you use more than 20% left, Arduino can restart or print on serial strange strings.

I would suggest you to try

#define _GSM_TXPIN_ 2
#define _GSM_RXPIN_ 3

Hi Thanks for the reply. So you suggest

define GSM_TXPIN 2

define GSM_RXPIN 3

Even when pin 0 has RX written on the side and TX is written on the side of pin 1?

So you suggest

define GSM_TXPIN 2

define GSM_RXPIN 3

Even when pin 0 has RX written on the side and TX is written on the side of pin 1?

And connect the device to pins 2 and 3. The device expects to use SoftwareSerial to communicate with the Arduino. SoftwareSerial does not operate on pins 0 and 1, because those are the hardware serial pins.

This project looks to be way over your head at this time, since you appear to have about a week's experience, or less, with the Arduino and have done nothing else with it.

Hi

Thanks for the reply. I have done some projects with arduino but not used gsm modules before. All your help is appreciated.

I will make attempts to see if it works now.

Thanks

Hello

Thanks again for the help. I have dealt with that issue and gone on to do the send text example.

#include “SIM900.h”
#include <SoftwareSerial.h>
//If not used, is better to exclude the HTTP library,
//for RAM saving.
//If your sketch reboots itself proprably you have finished,
//your memory available.
//#include “inetGSM.h”

//If you want to use the Arduino functions to manage SMS, uncomment the lines below.
#include “sms.h”
SMSGSM sms;

//To change pins for Software Serial, use the two lines in GSM.cpp.

//GSM Shield for Arduino
//www.open-electronics.org
//this code is based on the example of Arduino Labs.

//Simple sketch to send and receive SMS.

int numdata;
boolean started=false;
char smsbuffer[160];
char n[20];

void setup()
{
//Serial connection.
Serial.begin(9600);
Serial.println(“GSM Shield testing.”);
//Start configuration of shield with baudrate.
//For http uses is raccomanded to use 4800 or slower.
if (gsm.begin(2400)){
Serial.println("\nstatus=READY");
started=true;
}
else Serial.println("\nstatus=IDLE");

if(started){
//Enable this two lines if you want to send an SMS.
if (sms.SendSMS("+447904197271", “Hi can you call home number thanks”))
Serial.println("\nSMS sent OK");
}

};

void loop()
{
if(started){
//Read if there are messages on SIM card and print them.
if(gsm.readSMS(smsbuffer, 160, n, 20))
{
Serial.println(n);
Serial.println(smsbuffer);
}
delay(1000);
}

};

I get a message saying the the message has been sent but I can not see it on the particular phone.

Hope you can help.

Hello, Cybernetics !

How you solved Pins problem in GSM.cpp I have the same problem.

Thank you!