SIM800L module for arduino will not call or send message sometimes
<p>The code works but  many times it fail to call/send message even when  interface is right connected. It fails about 10% and the program is moving on. How to retry to call if there is any error  on calling(maybe on signal or whatever)?I think I  have to deal with <a href="http://cristiansteib.github.io/Sim800l/info/SIM800+Series_AT+Command+Manual_V1.09.pdf" rel="nofollow">AT</a> commands but I don't know how to handle that. I am using this <a href="https://github.com/Seeed-Studio/GPRS_SIM900" rel="nofollow" title="library">library</a>. AT commands are <a href="http://cristiansteib.github.io/Sim800l/info/SIM800+Series_AT+Command+Manual_V1.09.pdf" rel="nofollow" title="here">here</a> . My full code is <a href="http://hostcode.sourceforge.net/view/6387" rel="nofollow" title="here">here</a>. </p>

<pre><code>#include &lt;GPRS_Shield_Arduino.h&gt;
#include &lt;SoftwareSerial.h&gt;
#include &lt;Wire.h&gt;


#define PIN_TX    7
#define PIN_RX    8
#define BAUDRATE  9600
#define PHONE_NUMBER "003xxxxxxxxxx"
#define MESSAGE  "Temp is high"

GPRS gprsTest(PIN_TX, PIN_RX, BAUDRATE); //RX,TX,BaudRate

void setup() {
  Serial.begin(9600);

  // code 

}

void loop() {

// ..code..


  if (temp&gt;35) {
    call_and_text();
  }

// ..code..

}

call_and_text() {
  while (!gprsTest.init()) {
    delay(1000);
    Serial.print("init error1\r\n");
  }
  Serial.println("gprs init success");
  Serial.println("start to send message ...");
  gprsTest.sendSMS(PHONE_NUMBER, MESSAGE); //define phone number and text
  Serial.println("Init success, start to call...");
  gprsTest.callUp("003xxxxxxxxx");

}
</code></pre>