Problem with cellular shield, can`t communicate

I bought the cellular shield from Sparkfun: http://www.sparkfun.com/products/9607

I have the Arduino UNO.

The Arduino is powered with an external power supply. (I have tried both 5V 2A and 12V 2A)
The shield is mounted on top of the arduino, and uses pin 2 and 3 for serial communication.

I have programmed the arduino with this code:

/* 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 <NewSoftSerial.h>  //Include the NewSoftSerial 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.
NewSoftSerial 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 SM5100B Communication...");
}
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.
}
}

But what i recieve in the serial monitor is:

Starting SM5100B Communication... 
ù) û

Its the same characters every time.
Nothing happens when i send "AT" to the shield.

I have tried all of the baud rates, and in most other rates, a single character repeats itself on the serial monitor.

Anyone have an idea of what might be wrong?
Can the cellular shield(or the GSM module) be defective?

That sure looks like an incorrect baud setting too me. Did you try 115200 baud setting?

I did.
Got this:
~??@@ !¿~??@@ !¿~??@@ !¿~??@@ !¿
?+©R?¥Á5
?+©R?¥ÅÁX"SS$ b??"¬??E%bÁ±S? b?I?",??HS($ j)ÿ
?+©R?¥Ý5

None of the standard baud settings (up too 115200) have worked.

I think i might know whats wrong...
If the GSM chip is set to 115200, the softserial library wont be able to read it correctly, right? Due to the baud limitations.

eihea002:
I think i might know whats wrong...
If the GSM chip is set to 115200, the softserial library wont be able to read it correctly, right? Due to the baud limitations.

After reading some of the comments at Sparkfun I would have to agree.

I am having the exact same problem and I am pretty much stumped. I think that I read your post on http://tronixstuff.wordpress.com/2011/01/19/tutorial-arduino-and-gsm-cellular-part-one/

I tried this, not exactly sure I did it right

Interim update: If I go into the NewSoftSerial.cpp and change the interrupt timings for our 16MHz chip to the following I get about 27 characters per chunk before it loses synchronization. That’s enough to send the AT command to the SM5100B to change its baud rate to something more manageable. But just in case anyone else runs into this problem, here are the timing values (using NewSoftSerial library version 10):
#if F_CPU == 16000000
static const DELAY_TABLE PROGMEM table[] =
{
// baud rxcenter rxintra rxstop tx
{ 115200, 1, 16, 16, 12, }, changed this in a txt file and re-saved it as the original
(… and so on…)
Comment by Jens | September 18, 2011
#
Allright here is my conclusion: (1) the hardware is overwhelmed, but (2) it can be made “well enough” to at least change the SM5100B baud rate to 9600. Here are the parameters that worked the best for my NewSoftSerial library:
#if F_CPU == 16000000
static const DELAY_TABLE PROGMEM table[] =
{
// baud rxcenter rxintra rxstop tx
{ 115200, 1, 16, 15, 14, }, Tried this too
… and so on. In particular the rxcenter, rxintra, and rxstop parameters have no wiggle room. Note that rxintra and rxstop have to be set different … Depending on the Arduino Uno readout baud rate (9600 versus 115200) there is a two-character artifact at different places of the long +SIND: reply. That indicatees that the NewSoftSerial library works in principle but that the hardware (the Arduino) just can’t process the 115200 SM5100B readout baud rate.
The command to send to the GSM chip to reset its (default) baud rate is:
AT+IPR=9600 I think I might be screwing this up, I have not been able to confirm my command was sent when send it in the serial monitor
If it works as documented, the setting is persistent. We’ll see.
Hope this helps … Thanks, Jens
Comment by Jens | September 18, 2011

This did not seem to work, so I looked at http://www.sparkfun.com/products/9607 and found this

33Warlord | March 20, 2010 at 4:32 PMComment Rating1
Heads-up to anyone who has problems communicating with the SM5100B... My shield arrived with the SM5100B configured for a baud rate of 115200 NOT the 9600 specified.
33Warlord | March 20, 2010 at 7:05 PMComment Rating1
Is anyone else having problems with this shield?
The Arduino pass-thru sketch does not work, and I cannot upload from Arduino with the shield in place. (Even though the jumper to select rx/tx are in their factory setting at pins 2/3)
I only works if I connect an FT232RL breakout TX/RX to directly to pins 2/3 AND set the baud to 115200 as mentioned above. I usde a different USB/TTL break out and I was able to see the SIND commands
33Warlord | March 21, 2010 at 8:21 AMComment Rating1
Fixed! In case anyone else has problems getting their shield working.
Problem: The default baud rate (for the SM5100) was set at 115200; this is also the default as stated on page 25 of the AT command document. Not sure if this is only on my board or the whole batch. The shield's solder jumpers configure it to use pins 2/3 for the SM5100B's output. Using pins 2/3 requires using Softserial.
Softserial CAN NOT receive at 115200 baud. Therefore the Arduino does not see any serial traffic from the 5100.
Fix: Connect to pins 2/3 with any serial TTL connection (FT232 breakout, FTDI cable, etc...) Connect at 115200 baud, and you should see some commands output by the 5100 ("+SIND: 4", etc..) type in this command to reset the baud rate to 9600: "AT+IPR=9600" It should respond with "OK". (This setting is saved in non-volatile memory.) for some reason it does not give me the OK when I do this
SparkFun Employee zagGrad | March 22, 2010 at 7:55 AMComment Rating1
Hi,
The modules we send are supposed to be reconfigured to 9600 baud here at SparkFun during their test procedure. I'm sorry that you had so much trouble getting yours up and running; hopefully this isn't a widespread issue.
FYI, the 5100 is connected to soft serial pins so that the Arduino can be reprogrammed without removing the cellular module. Bus contention is introduced when the sm5100 comm. pins are connected to the hardware serial lines of the Arduino.

I am sure that once I can get past this little hurdle I will be able to move on with some of the projects in the tutorial.

This is what I am getting with the 115200 baud from my USB/TTL

~<0><0><0><0><0þ~~<0><0><0><0><0þ~~<0><0><0><0><0þ~~<0><0><0><0><0þ~~<0><0><0><0><0þ~
+SIND: 1

+SIND: 10,"SM",1,"FD",1,"LD",1,"MC",1,"RC",1,"ME",1

+SIND: 11

+SIND: 3

+SIND: 4

It looks like the board is working at 115200 baud but it does not do anything when I try to give it any commands. I have the TXD connected to pin 2 and RXD connected to pin 3. Still just need to switch it to 9600.

@gru491
What program are you using?
Using a Mac, I got away with the integrated Serial Monitor of Arduino.app (your commands need to have a carriage return!)
Using Windows, this works as well: Terminal

The first thing you need to check is sending the command AT alone and see if it replies "OK"
Then just type the command AT+IPR=9600

footswitch

I was able to get the shield to work eventually after a lot of trial and error. I think it might have been my TTL, I would send the commands and I would not get a response. I am having the same issue right now trying to send commands to a GPS device. I am new at sending the commands and I understand that I need to do a "CR" and "LF" for them. But I am totally confused on what exactly it looks like. In the Terminal program where it says send it has a little box to check for CR, does that take care of it for me?
Thanks for the web site but this X1##Y2##Z3##$0D$0A - this will send 'X1#Y2#Z3#"CR""LF"' confused me a little more.

Yes, checking that 'CR' box should take care of things. If not, try to check also the 'LF' button, if there's one.
Some modules require only CR (LF being optional), others require both CR+LF.
These characters don't "look like" anything, they're just special characters that normally aren't visible to the user (it's somewhat like sending the 'enter' key to the module after sending a command, so that it will acknowledge an "end of command" and process it).

Depending on the module you're working on, it may not be strange that a double ## is turned into #. Sometimes you need to send "special" characters twice in order to effectively send that character alone. If that's the case, they're called escape characters.
You'll have to check the datasheet/manual for that particular module.

EDIT: Sorry, didn't read your post as I should have. $0D and $0A are escape "expressions" that represent the hexadecimal value of CR and LF/NL respectively. That may only apply to the specific program that you're using, in this case Terminal?
When it's Arduino itself communicating with the module:
--> Serial.println("something") // sends command with line feed
--> Serial.print("something") // sends command without line feed

footswitch