 
   //check if mobile number is register in the network
   //GPRS.println("AT+CREG=?");
- 
+
   /*******************************************************
    * configuration of GPRS data 
    *******************************************************/
- InitGPRS();
-
- /***********************************************************
+  InitGPRS();
+
+  /***********************************************************
   * GPS configuration
   ***********************************************************/
   //GPS configuration
-  GPRS.println("AT+CGPSPWR=1");  //POWER ON of GPS interface
+  //GPRS.println("AT+CGPSPWR=1");  //POWER ON of GPS interface
   //SerialSim808_Read();
+  sim808_check_with_cmd("AT+CGPSPWR=1\r\n","OK\r\n",CMD); 
   delay(50);
   
-  GPRS.println("AT+CGPSRST=1");  //1 = HOT start of GPS or COLD start = 0
+  //GPRS.println("AT+CGPSRST=0");  //1 = HOT start of GPS or COLD start = 0
   //SerialSim808_Read();
+  sim808_check_with_cmd("AT+CGPSRST=0\r\n","OK\r\n",CMD);
   delay(50);
   
 //  GPRS.println("AT+CGPSSTATUS?");

  ********************************************************************************/
boolean GPSAnalyzer(char *gpsBuffer) {
   char *token;

   /* get the first token */
   //Serial.println("**Content of gpsBuffer**");
   //Serial.println("valor do buffer :");
   //Serial.println(gpsBuffer);
   
   //Get Command sent
   token = strtok(gpsBuffer,"\n\r" );

#define DEBUG 1
//#define NO_NETLIGHT 1   //turn on or off netlight of sim808 board
#define PROTOCOL 2   //1 = TCP and 2 = UDP

#ifdef PROTOCOL
