Call with Arduino Sim900

0

Hello Good afternoon, I have tried the SIM900 and I have only managed to send messages but it does not make the call, here my code

#include <SoftwareSerial.h>

// Configure software serial port
SoftwareSerial SIM900(7, 8); 



void setup()
{

      delay (5000);  //Nos damos un tiempo para encender el GPRS y la alimentación de la tarjeta
      SIM900.begin(19200);  //Configura velocidad del puerto serie para el SIM900
      Serial.begin(19200);  //Configura velocidad del puerto serie del Arduino
      Serial.println("OK");

    //Esta desbloqueado
    //  SIM900.println("AT+CPIN=\"\"");  //Comando AT para introducir el PIN de la tarjeta
      delay(25000);  //Tiempo para que encuentre una RED


llamar();


}


void loop()
{


}

void mensaje_sms()
   {
      Serial.println("Enviando SMS...");
      SIM900.print("AT+CMGF=1\r");  //Configura el modo texto para enviar o recibir mensajes
      delay(1000);
      SIM900.println("AT+CMGS=\"+593994053055\"");  //Numero al que vamos a enviar el mensaje
      delay(1000);
      SIM900.println("SMS enviado desde un Arduino. Saludos de Prometec.");  // Texto del SMS
      delay(100);
      SIM900.println((char)26); //Comando de finalización ^Z
      delay(100);
      SIM900.println();
      delay(5000);  // Esperamos un tiempo para que envíe el SMS
      Serial.println("SMS enviado");
   }
void llamar()
   {

      Serial.println("Realizando llamada...");
      SIM900.println("ATD + +593994083065;");  //Comando AT para realizar una llamada
      delay(30000);  // Espera 30 segundos mientras realiza la llamada
      SIM900.println("ATH");  // Cuelga la llamada
      delay(1000);
      Serial.println("Llamada finalizada");

   }
    
asked by Javier 26.08.2018 в 00:02
source

1 answer

1

The error is in the syntax of the AT command, it uses the following correction for the call to this command.

Instead of

SIM900.println("ATD + +593994083065;");  //Comando AT para realizar una llamada

Use this syntax:

SIM900.println("ATD+593994083065;");  //Comando AT para realizar una llamada
    
answered by 06.12.2018 в 11:11