Hi,
I have an Arduino Mega 2560 & Sim900 Module, both are well connected and tested.
Connection:
- 5v & GND from Arduino Mega is connected to 5v & GND to SIM900 Modem Card
- Jumper setting on SIM900 Modem Card is set to use pin (Not SerialSoftware):
SIM900 Arduino Mega2560
0 (TX) -----------> 1(TX0)
1 (RX) -----------> 0(RX0)
- Arduino Mega is connected using USB cable.
- Using docklight v2.3 connected to Arduino Mega by USB y can reach the SIM900 over USB cable. AT commend respond OK with no erros.
- When i send manually an SMS using docklight, everything working fine. SMS sent to proper destiny with no errors.
After testing, where i verified that every component is working fine i tried to send SMS by script and it doesn't work, using the same AT commend that i used during testing stage.
Could some one help me on this issue?
AT commands used for send SMS
AT+CMGF=1 //Prepare Modem for Text SMS
AT+CMGS="+569XXXXXXXX" //Set SMS destiny
ATENCION : Alarma Activada. //Set SMS content
CTRL+Z //Close SMS with CTRL+Z
Script
void setup() {
// put your setup code here, to run once:
Serial.begin(19200); //Setup BaudRate
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("AT+CMGF=1"); //Prepare Modem for Text SMS
delay(500);
Serial.println("AT+CMGS="+56992195858""); //Set SMS destiny
delay(500);
Serial.println("ATENCION : Alarma Activada."); //Set SMS content
delay(500);
Serial.println((char)26); //Close SMS with CTRL+Z
delay(500);
Serial.println("Waiting 30 sec");
delay(30000); //Wait 30sec for loop
Serial.println("Starting again ...");
}