Problem with GPS tracking with receive sms

Hi everyone… I was following the instructions of this site
http://www.toptechboy.com/arduino/lesson-23-arduino-gps-with-data-logger/
and I did it. Then I tried to add a receive sms to active the gps through sms password. but it dont work. can you help me how to solve this problem? since i tried to compile it without error. Thank you :smiley:

#include <SD.h> 
#include<SPI.h>
#include <string.h>
#include <Adafruit_GPS.h>   
#include <SoftwareSerial.h> 
SoftwareSerial mySerial(3,2);
byte buffer[128]; 
int count=0;
SoftwareSerial Sim900Serial(5,6);
Adafruit_GPS GPS(&mySerial); 

String NMEA1; 
String NMEA2;
char c; 

int chipSelect = 4; 
File mySensorData; 

unsigned long fix_age;
long lat, lon;
float LAT, LON;
void SIM900power()
{
digitalWrite(9, HIGH);
delay(1000);
Sim900_Inti();
}
void setup() {
  Sim900Serial.begin(115200); 
  Serial.begin(115200); 
  GPS.begin(9600); 
  GPS.sendCommand("$PGCMD,33,0*6D");  
  GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA); 
  GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ); 
  delay(1000);                                                                                                                                                                               
  
  pinMode(10, OUTPUT); 
  SD.begin(chipSelect); 
  
  if (SD.exists("NMEA.txt")) { 
    SD.remove("NMEA.txt");
  }  
  if (SD.exists("GPSData.txt")) { 
    SD.remove("GPSData.txt");
  }
Sim900_Inti();
}

void loop() {
  Sim900Serial.listen();
if (Sim900Serial.available()) 
{

while(Sim900Serial.available()) 
{
buffer[count++]=Sim900Serial.read(); 
if(count == 64)break;
}
Serial.write(buffer,count);
Cmd_Read_Act();
  count = 0; 
}
}
void Cmd_Read_Act(void)
{
char buffer2[64];
for (int i=0; i<count;i++)
{ buffer2[i]=char(buffer[i]);}
if (strstr(buffer2,"password123")) 
{  
Serial.println("Password Authenticated.");
Serial.println("Sending reply SMS. ");
  readGPS();

  if(GPS.fix==1) {
  mySensorData = SD.open("NMEA.txt", FILE_WRITE); //Open file on SD card for writing
  mySensorData.println(NMEA1); //Write first NMEA to SD card
  mySensorData.println(NMEA2); //Write Second NMEA to SD card
  mySensorData.close();  //Close the file
  mySensorData = SD.open("GPSData.txt", FILE_WRITE);
  mySensorData.print(GPS.latitude,4); //Write measured latitude to file
  mySensorData.print(GPS.lat); //Which hemisphere N or S
  mySensorData.print(",");
  mySensorData.print(GPS.longitude,4); //Write measured longitude to file
  mySensorData.print(GPS.lon); //Which Hemisphere E or W
  mySensorData.print(",");
  mySensorData.println(GPS.altitude);
  mySensorData.close();
}
}
}
void readGPS() {
  
  clearGPS();
  while(!GPS.newNMEAreceived()) { //Loop until you have a good NMEA sentence
    c=GPS.read();
  }
  GPS.parse(GPS.lastNMEA()); //Parse that last good NMEA sentence
  NMEA1=GPS.lastNMEA();
  
   while(!GPS.newNMEAreceived()) { //Loop until you have a good NMEA sentence
    c=GPS.read();
  }
  GPS.parse(GPS.lastNMEA()); //Parse that last good NMEA sentence
  NMEA2=GPS.lastNMEA();
  
  Serial.println(NMEA1);
  Serial.println(NMEA2);
  Serial.println("");
  
}

void clearGPS() {  //Clear old and corrupt data from serial port 
  while(!GPS.newNMEAreceived()) { //Loop until you have a good NMEA sentence
    c=GPS.read();
  }
  GPS.parse(GPS.lastNMEA()); //Parse that last good NMEA sentence
  
  while(!GPS.newNMEAreceived()) { //Loop until you have a good NMEA sentence
    c=GPS.read();
  }
  GPS.parse(GPS.lastNMEA()); //Parse that last good NMEA sentence
   while(!GPS.newNMEAreceived()) { //Loop until you have a good NMEA sentence
    c=GPS.read();
  }
  GPS.parse(GPS.lastNMEA()); //Parse that last good NMEA sentence
  
}
void Sim900_Inti(void)
{
Sim900Serial.println("AT+CMGF=1"); // Set GSM shield to sms mode
Serial.println("AT+CMGF=1");
delay(500);
Sim900Serial.println("AT+CNMI=2,2");
Serial.println("AT CMGF=1");
delay(500);
}

but it dont work.

it do something. You expect it to do something. You don't explain what it do, or what you expect it to do. Therefore, it's going to be hard to help you.

SoftwareSerial mySerial(3,2);
byte buffer[128]; 
int count=0;
SoftwareSerial Sim900Serial(5,6);

It's time to quit beating your head against a wall. You need a Mega. Make life easy. Get one.

Personally I'd put in a few more Serial.println() statements to see how far the program is getting.

Sorry I was planning to make a gps tracking device and i tried to add a sms password for activation. I use Arduino GSM shield and Adafruit GPS breakout

Sorry I was planning to make a gps tracking device and i tried to add a sms password for activation. I use Arduino GSM shield and Adafruit GPS breakout

And the problem is? You can't listen to the GPS and the SMS device at the same time.

there's no error but when i tried to send password to activate the gps it wont show up the nmea sentences from gps. sorry if you find hard to understand, I'm still new at this

thank you for your reply :)