 void gsm_reset() {
   pinMode(GSM_RESET_PIN, OUTPUT);
   digitalWrite(GSM_RESET_PIN, HIGH);
-  delay(1000);
+  delay(100);
   digitalWrite(GSM_RESET_PIN, LOW);
-  delay(1000);
+  delay(100);
   digitalWrite(GSM_RESET_PIN, HIGH);
-  delay(1000);
+  delay(100);
 }
 
 uint8_t gsm_init() {
-  if (gsm_send_command_P(F("AT"))) {
+  gsm_reset();
+  
+  bool success = false;
+  
+  for (uint8_t i = 0; i < 10; ++i) {
+    if (gsm_send_command_P(F("AT")) == 0) {
+      success = true;
+      break;
+    }
+  }
+
+  if (!success) {
     return 1;
   }
 

  Serial.println(_apn);

  if (gsm_send_command_P(F("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\""))) {
    return 8;
  }

  _gsm_serial.listen();

  _gsm_serial.println(F("\""));

  if (gsm_send_command(0)) {
    return 5;
  }

  if (gsm_send_command_P(F("ATS0=1"))) {
    return 6;
  }
}

void gsm_check_sms() {
