1

Can you help me with the codes? I have gizduino(arduino clone), i used the codes in receiving sms from the internet but what i receive is a symbol "y" with two dots at the top. Whats wrong?

My gsm is set to suart.

// Example 55.4

#include <SoftwareSerial.h>
SoftwareSerial SIM900(2,3);

char incoming_char=0;

void setup()
{
  Serial.begin(19200); // for serial monitor
  SIM900.begin(19200); // for GSM shield
  SIM900power();  // turn on shield
  delay(20000);  // give time to log on to network.

  SIM900.print("AT+CMGF=1\r");  // set SMS mode to text
  delay(100);
  SIM900.print("AT+CNMI=2,2,0,0,0\r"); 
  // blurt out contents of new SMS upon receipt to the GSM shield's serial out
  delay(100);
}

void SIM900power()
// software equivalent of pressing the GSM shield "power" button
{
  digitalWrite(9, HIGH);
  delay(1000);
  digitalWrite(9, LOW);
  delay(7000);
}

void loop()
{
  // Now we simply display any text that the GSM shield sends out on the serial monitor
  if(SIM900.available() >0)
  {
    incoming_char=SIM900.read(); //Get the character from the cellular serial port.
    Serial.print(incoming_char); //Print the incoming character to the terminal.
  }
}

migrated from electronics.stackexchange.com Jan 19 '16 at 2:38

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • You are most likely using the wrong baud rate. Try 9600, 57600 and 115200. Are you sure of that power up procedure? Is there any evidence that the module is on? – TisteAndii Jan 19 '16 at 10:48
1

Most probably you are using sim900 or sim800 module. These modules would be either fixed to a certain baudrate like 9600 or 115200, OR the module might be at auto-baud mode.

In auto baud mode you need to send AT\r to the modem after the modem is switched ON so it can know what baud you are using.

Please check the following...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy