Sim900a echos garbage symbols when reading sms

I am using baud rate 115200 for all my hardware and this GSM module just does not cooperate spitting garbage symbol even after using the proper baud rate.

Here is a sample its supposed to be "Hello man"

18:03:05.088 -> +CMT: "+f39662797237B,"","24/04/b7,18:03:01+c2"
18:03:05.088 -> Hello m�n

This is how I read.

if (SIM900A.available() > 0) {
    Serial.write(SIM900A.read());
}

I am out of something to suspect. Please help

Your post is lacking details. E.g board and a sketch that demonstrates the issue.

Is SIM900A object a SoftwareSerial instance? In that case a safe baud rate will be 19200.

SoftwareSerial also can't send and receive at the same time.

1 Like

Thanks 19200 fixed the problem. But I already tried it before now I just added the command

AT+IPR=19200

What I dont understand is I already set the baud rate using

SIM900A->begin(baud);

why do i have to call this AT+IPR=19200 ? I dont understand why you have to call both

void initialize_sms(SoftwareSerial *SIM900A, int32_t baud) {
  Serial.println(F("SMS: INITIALIZING"));

  // Match baud rate of GSM module to the arduino module baud rate
  SIM900A->begin(baud);
  SIM900A->print(F("AT+IPR=19200\r")); 

  // Give time to your gsm  to connect to the network
  Serial.println(F("SMS: CONNECTING TO NETWORK"));
  delay(1000);

  Serial.println(F("SMS: READY"));
}

I have no knowledge of SIM modules, sorry.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.