         skip();
       }
     }
+    if (i++ > tries) {
+      // ABORT
+      espStream->print("\r\nAT\r\n");
+      while(waitData(100)) {
+        readLine();
+      }
+      return false;
+    }
   }
   espStream->print(str);
   DEBUG_SERIAL.println(str);

  readLineLowLevel();
  waitData(100);
  readLine();
}

boolean sendPrep() {

  return n;
}

boolean netsend_P(int n, PGM_P str) {
  //DEBUG_SERIAL.println("NSP");
  char buff[BUFFER_SIZE+1];
  strncpy_P(buff, str, BUFFER_SIZE);
  buff[BUFFER_SIZE]=0;
  return netsend(n, buff);
}

boolean netsend(int n, char* str) {
  //DEBUG_SERIAL.println("NSLL");
  int tries = 10;
  int i = 0;
  boolean ok = false;
  while (!ok) {
    while(waitData(50)) {
