 posBuf=0;
 int i = 0;
 int j=0;
-  Serial.println("***LOOP***");
+
+  digitalWrite(DTRkey, LOW);  //exit sleep mode
+  delay(50);                  //time to exit sleep mode
+  
+  //sim808_send_cmd("AT+CFUN=1\r\n");
+  
+  //Serial.println("*LOOP*");
   //readAllError();  //print all errors present in the previous loop
   
-//  //waking up GPS after sleep
+  //  //waking up GPS after sleep
   //if(!connect_GPS(25, RUNNING_TIME)){ //timeout of 25 seconds to acquire signal, 1h worst case lost 2x
 
   if(!connect_GPS(30, RUNNING_TIME)){ //timeout of 25 seconds to acquire signal, 1h worst case lost 2x  


      
      //strcpy(gpsMode,token);
      Serial.print("ph#: ");
      Serial.println(phone);   
   }else return false;
   
   return true;


  if ((readCurrentError(NO_GPRS_SIGNAL))== 1){
    timer.disable(timerID);
//    Serial.println("GetGPSDisabled");
    connect_GPS(120, RUNNING_TIME);                        //leave GPS ON/COLD START until timeout of 120 sec

    sim808_check_with_cmd("=0\r\AT+CGPSPWRn","OK\r\n",CMD);   //put GPS to sleep either acquire signal or not   
