Arduino SIM900 spitting random numbers at me

Hello!

I'm new to arduino and everything related to it! I'm trying to use a SIM900 shield with the arduino. You can see the code and the monitor in my picture. It responds with a bunch of numbers which makes no sense. I'm trying to read my sms storage. Can someone give me some insight in what i might be doing wrong?

|500x271

This is the guide my seller provided http://wiki.epalsite.com/index.php?title=SIM900_Quad-Band_GPRS_shield

Best regards, Glutch

I can't read your picture. Can you possibly copy and paste the code and output where it is readable?

Don't forget code tags. Don't forget code tags. Don't forget code tags. Don't forget code tags.

Repeated to make sure you don't overlook it and try to inline the code and get it all messed up.

#include <SoftwareSerial.h>
 
SoftwareSerial Sim900Serial(2, 3);
 
void setup(){
  
  Serial.begin(19200); // for serial monitor
  Serial.println("Setup started");
  Sim900Serial.begin(115200);               // the GPRS baud rate  
  delay(2000);
  Sim900Serial.println("AT+IPR=19200");     // Set the baud rate
  delay(500);
  Sim900Serial.begin(19200);               // the GPRS baud rate   
  delay(1000);
  Serial.println("Setup completed");
  delay(1000);
  Sim900Serial.print("AT+CPMS=\"SM\"\r");
  delay(1000);
  Sim900Serial.print("AT+CPMS=?");
  
}
void loop(){
  
   //Sim900Serial.print("AT+CMGR=1\r");
   //Sim900Serial.print("AT+CMGL=\"ALL\"");
   
   if (Sim900Serial.available()){
    Serial.println(Sim900Serial.read());
   }
   
}

There you go! :slight_smile:

Why do you have two begin statements with two different baud rates for the software Serial instance?

That had me confused too. But i’m just following the example provided

http://wiki.epalsite.com/index.php?title=SIM900_Quad-Band_GPRS_shield

#include <SoftwareSerial.h>

SoftwareSerial Sim900Serial(2, 3);

void setup()
{
  Sim900Serial.begin(115200);               // the GPRS baud rate  
  delay(2000);
  Sim900Serial.println("AT+IPR=19200");     // Set the baud rate
  delay(500);
  Sim900Serial.begin(19200);               // the GPRS baud rate   
  delay(1000); 
}
void loop()
{
  Sim900Serial.println("ATD***********;");//'*'instead the phone number you want to dial
  while(1);
}

You should never use a line of code if you don't know what it does or why it's there. Otherwise you end up scratching your head over something stupid that someone else did. I'd want to know why they did that. Especially something that looks that strange.

I'm following a guide that the seller provided when i bought the product. They do the same in every example. I'm new to arduino and c++. I know the basics of baud rate. What am i supposed to do?

I guess you just blindly follow that example and keep wondering why it doesn't work then.

Does the baud rate on the serial monitor match your Serial.begin?

The code assumes that the module is always set by default to 115200 bauds at starts, issues an AT command at the speed to change baud rate to 19200 and thus adjusts the baud rate to that new value afterwards

So question is does this match your hardware défaut ?

J-M-L:
The code assumes that the module is always set by default to 115200 bauds at starts, issues an AT command at the speed to change baud rate to 19200 and thus adjusts the baud rate to that new value afterwards

So question is does this match your hardware défaut ?

Im not sure, is there a way to check?