Hello folks. I would really appreciate some helping comments on my GSM shield problem. The thing is (obviously) it does not do as it’s supposed to do …
I only use the arduino Uno (rev 3) and the GSM shield with the 5100b module (and an antenna: GSM Quad-band Antenne SMA). I also use the example code from this tutorial: http://tronixstuff.wordpress.com/2011/01/19/tutorial-arduino-and-gsm-cellular-part-one/ which works fine to a certain point - which sadly is the one where you should start communicating with the device
Here is my code (1:1 copy from the tutorial. Uses SoftwareSerial.h instead of NewSoftSerial.h):
/* SparkFun Cellular Shield - Pass-Through Sample Sketch
SparkFun Electronics Written by Ryan Owens CC by v3.0 3/8/10
Thanks to Ryan Owens and Sparkfun for sketch */
#include <SoftwareSerial.h> //Include the SoftwareSerial library to send serial commands to the cellular module.
#include <string.h> //Used for string manipulations
char incoming_char=0; //Will hold the incoming character from the Serial Port.
SoftwareSerial cell(2,3); //Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin.
void setup()
{
//Initialize serial ports for communication.
Serial.begin(9600);
cell.begin(9600);
Serial.println("Starting Communication with the SM5100B ...");
}
void loop()
{
//If a character comes in from the cellular module...
if(cell.available() >0)
{
incoming_char=cell.read(); //Get the character from the cellular serial port.
Serial.print(incoming_char); //Print the incoming character to the terminal.
}
//If a character is coming from the terminal to the Arduino...
if(Serial.available() >0)
{
incoming_char=Serial.read(); //Get the character coming from the terminal
cell.print(incoming_char); //Send the character to the cellular module.
}
}
When I now look at the serial monitor, I see:
Starting Communication with the SM5100B ...
+SIND: 0
+SIND: 10,"SM",0,"FD",0,"LD",0,"MC",0,"RC",0,"ME",0
+SIND: 7
Starting Communication with the SM5100B ...
+SIND: 0
+SIND: 10,"SM",0,"FD",0,"LD",0,"MC",0,"RC",0,"ME",0
+SIND: 7
Starting Communication with the SM5100B ...
+SIND: 0
+SIND: 10,"SM",0,"FD",0,"LD",0,"MC",0,"RC",0,"ME",0
+SIND: 7
Starting Communication with the SM5100B ...
+SIND: 0
+SIND: 10,"SM",0,"FD",0,"LD",0,"MC",0,"RC",0,"ME",0
+SIND: 7
Starting Communication with the SM5100B ...
+SIND: 1
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"ME",1
+SIND: 11
+SIND: 3
+SIND: 4
Starting Communication with the SM5100B ...
+SIND: 1
+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"ME",1
+SIND: 11
+SIND: 3
+SIND: 4
So only sometimes I end up with the +SIND: 4 status at the end of up to 10 trys. After some googeling I found out, that maybe the psu is too weak. So i plugged a 12V 0.5A psu to my arduino. Didn’t change anything. I got the feeling, the module needs some time of pause. So for example, if I let it rest for some time and then try it again, I usually come to the point, where it answers: +SIND: 4. If I manage to get to this point, I usually change from the serial monitor to the “Terminal” called software (Terminal) to connect to the Arduino. But, even if I get a +SIND: 4 here, this is the point where it all comes to an end. Meaning: No matter which command I send to the GSM module, I don’t get any answer. It looks like the program has already crashed at this point
What could be my problem?