I have an Arduino Uno board companied with a SIM900 shield (the one in the picture). By uploading this code to Arduino, I am able to send an SMS to my phone number (I think that means; the Arduino and the shield are working properly)
However, when typing AT command in serial monitor of Arduino program I don’t get an “OK” response, but I get nothing. Could you explain what's going on to this shield, please?
/*********
Complete project details at http://randomnerdtutorials.com
*********/
#include <SoftwareSerial.h>
// Configure software serial port
SoftwareSerial SIM900(7, 8);
void setup() {
// Arduino communicates with SIM900 GSM shield at a baud rate of 19200
// Make sure that corresponds to the baud rate of your module
SIM900.begin(19200);
// Give time to your GSM shield log on to network
delay(20000);
// Send the SMS
sendSMS();
}
void loop() {
}
void sendSMS() {
// AT command to set SIM900 to SMS mode
SIM900.print("AT+CMGF=1\r");
delay(100);
// REPLACE THE X's WITH THE RECIPIENT'S MOBILE NUMBER
// USE INTERNATIONAL FORMAT CODE FOR MOBILE NUMBERS
SIM900.println("AT + CMGS = \"+212625429762\"");
delay(100);
// REPLACE WITH YOUR OWN SMS MESSAGE CONTENT
SIM900.println("Message example from Arduino Uno.");
delay(100);
// End AT command with a ^Z, ASCII code 26
SIM900.println((char)26);
delay(100);
SIM900.println();
// Give module time to send SMS
delay(5000);
}