       delay(50);
     }
   }
+  else {
+    Serial.print("Network Registration: ");
+    Serial.println(gsm.getNetworkRegistration().status);
+    Serial.print("GPRS Attached: ");
+    Serial.println(gprs.isAttached());
+    Serial.println("Wait to connect...");
+    Serial.println();
+  }
   delay(1000); //It's just for debugging, no need to delay actually
 }

  if(!dte.AT())
    dte.powerReset();

  Serial.print("Network Registration: ");
  Serial.println(gsm.getNetworkRegistration().status);
  Serial.print("GPRS Attached: ");
  Serial.println(gprs.isAttached());
  Serial.println("Wait to connect...");
  Serial.println();
  if(ip.openConnection()) { // Open Connection, if it's already connected it just return true
    Serial.println("Connected!");
    unsigned long timeout = 30; // The minimum HTTP Timeout setting
    http.initialize(timeout);
    http.action("GET", "arduino.cc/asciilogo.txt");
    unsigned long t = millis();
    while(millis() - t < timeout*1000 && !Urc.httpAction.updated)
      dte.clearReceivedBuffer(); // This is necessary, so URC can be captured
    if(Urc.httpAction.updated && Urc.httpAction.statusCode == 200) {
      Serial.println("Data Received: ");

      //Serial.println();
    }
    else {
      Serial.println("Failed");
      if (Urc.httpAction.updated) {
        Serial.print("Status Code: ");
        Serial.println(Urc.httpAction.statusCode);
        if (Urc.httpAction.statusCode == 601)
          Serial.print("Try to add https:// for SSL site or http:// for non-SSL site");
      }
    }
    http.terminate();
    Serial.println("Done!");
