SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By bartje
#105680
Hey guys!

I recently bought the Cellular Shield and as is stated in the comments some of them are shipped with baudrate 115200 instead of 9600. So a FT232RL breakout or other TTL device must be used to tell it to use 9600 instead. The lib used can't actually use 115200 so you need a second device to tell it the new baudrate. At least, that's what I think.

When I plug in Arduino with the example sketch provided on above link, I simply see the line "Starting SM5100B Communication..." and then nothing for a few seconds. Then it starts sending random characters. Which would indicate I'm using the wrong baudrate!

So I've tried to basically use a FT232RL breakout but honestly I am lost with that. I have no clue how it works or should work. I thought I'd give it a shot with PuTTy but got no where.

So, I thought - hey, I have two Arduino's. So one of them could send the command to the pins 2/3 of the cellular shield from TX. And I've tried to do this basically on every single possible baudrate there is (well the "standard" ones anyway).
Code: Select all
Serial.begin(115200 );               // then tried to Serial.flush()+Serial.end() and tried a diff. baudrate.
Serial.println("AT+IPR=9600"); 
While connected. Of course I connected grounds as otherwise it wouldn't work. I swapped over the RX/TX and tried again. No luck.

So what can I do now, does anyone have a clue?

Thanks!

Edit: - thought I'd mention that the Arduino with the Cellular Shield had a 9V power supply at the time. So not USB, and I'm sure it wasn't a power issue. :)
By bartje
#105755
Anyone please help out? I'm really losing it here with this shield. It's an awesome concept but I just can't seem to get it to work.

I've now also tried this with Serial.print("AT+IPR=9600\r\n"), Serial.print("AT+IPR=9600\n"), all existing baudrates you can think of, one by one. I reset the shield every time because otherwise it would probably not read it.

Can I just get this shield to use the normal RX/TX pins? I don't care because it's on a Mega, 3 more UARTS to use... If the solder jumper is where I think it is, forget it...

Maybe I am missing something obvious. Say you bought this shield, what would your exact steps be once you think the baudrate is incorrect?

Thanks.
By kitunof
#105760
Just got it a couple of days and I'm having alike problem but worst that there is nothing even random character came out after "Starting SM5100B Communication...". The only thing that came out of the shield is the poorly soldered antenna cable. Absolutely not my day :cry:
By bartje
#105767
For me it only starts showing random characters after a few seconds. If you wait a while, do you see a ÿ?

Damn, most shields are virtually PnP but this is a tough one.
By whoismaha
#105814
I looked at the comments and saw this:

--------------------------
by 33Warlord +7| Mar 21, 2010 at 8:21am 0
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.)
--------------------------

FTDI would be the easiest, imo.
By bartje
#105826
Thanks for your reply whoismaha.

But like I wrote I've tried this. It still doesn't work, because basically I have no clue how to do this (I do have the hardware, but I'm new to it).

How would I do this?
By kitunof
#105850
I have a Mega1280 and find a way to setup the cellular shield to talk at 9600. First I bend pin 2 and 3 of the shield
so that when attach to the Mega the pins will not insert in to the pin header. Next find two hard wires to connect pin2
to Mega's Rx1 and pin3 to Mega's Tx1. I modified the Cellular_Shield_Passthrough sketch to use Serial1 instead of
NewSoftSerial because we need to talk at 115200.
Code: Select all
char incoming_char;

void setup()
{
  //Initialize serial ports for communication.
  Serial.begin(9600);
  Serial1.begin(115200);
  
  //Let's get started!
  Serial.println("Starting SM5100B Communication...");
}

void loop() {
   
  //If a character comes in from the cellular module...
  if(Serial1.available())
  {
    incoming_char=Serial1.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())
  {
    incoming_char=Serial.read();  //Get the character coming from the terminal 
    Serial1.print(incoming_char);    //Send the character to the cellular module.
  }
}
After uploading the sketch you should be able to see the correct output from the shield. Then type in AT+IPR=9600
and press enter. This will config the SM5100B to talk at 9600. From this point the shield should be ready for the original
Cellular_Shield_Passthrough sketch. Don't forget to return pin 2 and pin 3 to the original position.

Have fun!
Last edited by kitunof on Fri Jul 23, 2010 2:26 am, edited 1 time in total.
By bartje
#105852
Thanks for taking the time for this detailed description, Kitunof! I'm at work right now so I can't test it yet, but I'll test it tonight and post back results. If it works I'm gonna cheer so loud you can hear it in Boulder (long way from Europe).

So you only used one Arduino Mega, that is awesome :D
I think the whole two Arduino thing wasn't very handy.

Thanks again!
By kitunof
#105861
bartje,

Yes you can do Serial.println("AT+IPR=9600") right away. The sketch I modified is to make sure the shield talk at 115200 not at another baud rate.
By bartje
#105897
Kitunof, I LOVE YOU! :D

OH MY GOD, IT WORKS! F*CK YEAH!</hyperactive caps>

So guys, did you hear my cheer over there? :D

For those wondering and Google-impaired, you connect pin 2 to pin 19 and 3 to 18 on your Arduino Mega.

Thank you so much for your help!!

I just sent my first SMS! :D :D
By daleread
#105925
"AT+IPR=9600" will set the baud rate
use "AT&W" to save the baud rate.

I have done this by connecting a RS232 TTL converter to pins 2 and 3 of the SM5100B board, with NO program in the Arduino. This ensures that pins 2 and 3 float and do not interfeare with the RS232 TTL converter.

Then use hyperterminal to sent the commands, cr will be added by the return key.

To echo the commands from the SM5100B use "ATE1"

On all commands do not send the "

HTH

DaleR
By bartje
#105935
Ah yeah forgot to add that, I found it in the AT command list, too :)

Thanks for the addition!

So it turns out this shield is pretty easy to use :)
By daleread
#105976
Talking TCP/IP to http://www.google.com was challanging. Got it working eventually.

Now I can send and recieve data from any www site via .php and MySql database(s).

Found a problem with the Soft Serial, it corrupts characters under heavy load, even at 9600, so I have found the MEGA board to be 100% reliable via RXD1 and TXD1 from SM5100B pins 2 and 3.

HTH

DaleR