SIM908 GPS/GSM SHIELD

Hi guys. I have this SHIELD but i am not able to send sms.

I have connected:
--------------------------------------+
External power: 4.5V 1A
GSMRX to PIN 19 of arduino
GSMTX to PIN 18 of arduino
--------------------------------------+

I'm using a arduino mega 2560

Arduino Mega:
--------------------------------------+
tried with; USB power and / or external power 12V
--------------------------------------+

I have insert a valid sim in the shield. There is the sufficent credit.
I have tried different libraries, with edit gsm.h and hwserial.h uncommented #define MEGA
I use this sketch for sending a sms:
When i try to call the sim insert into sim900, it ring...

#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("MY NUMBER HERE", "Arduino SMS"))
    //  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("letto");
      Serial.println(n);
      Serial.println(smsbuffer);
    }
    delay(1000);
  }
}

but i have this output:

GSM Shield testing.
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:ELSE
ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

ATT: OK
RIC: AT

DB:ELSE
ATT: OK
RIC: AT

ATT: OK
RIC: AT
....
.....
ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp

status=IDLE

*** I have read HERE, at the end of page "12V", but i have powered with 4.5v using jack on the shield and a external power.

  • is this the problem?

Sorry for my english!
Help please :frowning: Thank you

but i have powered with 4.5v using jack on the shield and a external power.

If you are supplying power using the round barrel connector on the Arduino, you need to supply at least 7 volts. No way a voltage regulator can produce 5V output from 4.5V input.

I have tried different libraries, with edit gsm.h and hwserial.h uncommented #define MEGA

Show the changes you made, and provide links to the libraries you are using.

Thank you...

Library used:
1st library
2nd library

Arduino is powered using VIN PIN 12V and usb connected for debug (using serial monitor)
GSM GPS shield is connected with a round barrel connector 4.5v 1A.

Is correct?

Had a similar issue. This is clearly comms issue between your mega and the GSM module.
Try this bit in the GSM.cpp file at the top. Mod your PINs on the mega as well. PIN 10-TX 11-RX

/*MEGA PINS
#define _GSM_TXPIN_ 10
#define _GSM_RXPIN_ 11	
*/

See if this does the trick.

mazahyr:
Had a similar issue. This is clearly comms issue between your mega and the GSM module.
Try this bit in the GSM.cpp file at the top. Mod your PINs on the mega as well. PIN 10-TX 11-RX

/*MEGA PINS

#define GSM_TXPIN 10
#define GSM_RXPIN 11
*/




See if this does the trick.

i get this:

GSM Shield testing.
DB:NO RESP
DB:NO RESP
DB:NO RESP

:frowning: :frowning: :frowning:

roxdragon:
i get this:

GSM Shield testing.

DB:NO RESP
DB:NO RESP
DB:NO RESP



:( :( :(

Have you tried swapping them?

Silly thing to ask but did you uncomment the code I posted before?

Right Lets do it like this, might not be the best way but atleast it'll eliminate this option.

In the GSM.cpp file after the definition you might see something like this

#ifdef UNO
GSM::GSM():_cell(_GSM_TXPIN_,_GSM_RXPIN_),_tf(_cell, 10),_status(IDLE){
};
#endif

#ifdef MEGA
GSM::GSM(){
	_cell.begin(9600);
};
#endif

try testing after commenting the #ifdef MEGA part like:

#ifdef UNO
GSM::GSM():_cell(_GSM_TXPIN_,_GSM_RXPIN_),_tf(_cell, 10),_status(IDLE){
};
#endif

/* 
#ifdef MEGA
GSM::GSM(){
	_cell.begin(9600);
};
#endif 
*/

mazahyr:
Have you tried swapping them?

Yes.. but it doesn't work.

mazahyr:
Silly thing to ask but did you uncomment the code I posted before?

Right Lets do it like this, might not be the best way but atleast it'll eliminate this option.

In the GSM.cpp file after the definition you might see something like this

#ifdef UNO

GSM::GSM():_cell(GSM_TXPIN,GSM_RXPIN),_tf(_cell, 10),_status(IDLE){
};
#endif

#ifdef MEGA
GSM::GSM(){
_cell.begin(9600);
};
#endif




try testing after commenting the #ifdef MEGA part like:



#ifdef UNO
GSM::GSM():_cell(GSM_TXPIN,GSM_RXPIN),_tf(_cell, 10),_status(IDLE){
};
#endif

/*
#ifdef MEGA
GSM::GSM(){
_cell.begin(9600);
};
#endif
*/

I get a error:

SIM900.cpp:959: undefined reference to `GSM::GSM()'

I have tried: comment #ifdef UNO AND / or #ifdef MEGA but not success!

I have a mega2560

:frowning: :frowning:

I solved temporarily using this TUTORIAL.
Im studying for make a sketch or a library.
None GSM Shields library's is not caompatible with my shield GSM/GPS.

:confused: :o :frowning: