Obtain Latitude, longitude and satellite count from GPS: QUECTEL L80 and send data on server

I am trying to obtain Latitude, longitude and satellite count from GPS: QUECTEL L80 and send data on server. I am unable to separate the NMEA data using the following code, I tried different methods given but it did not work. Can someone help? Thanks in advance.
I am using arduino UNO for the same

#include "TinyGPS++.h"
#include "SoftwareSerial.h"

SoftwareSerial serial_connection(10, 11); //RX=pin 10, TX=pin 11
TinyGPSPlus gps;//This is the GPS object that will pretty much do all the grunt work with the NMEA data
void setup()
{
  Serial.begin(9600);//This opens up communications to the Serial monitor in the Arduino IDE
  serial_connection.begin(9600);//This opens up communications to the GPS
  Serial.println("GPS Start");//Just show to the monitor that the sketch has started
}

void loop()
{
  while(serial_connection.available())//While there are characters to come from the GPS
  {
    gps.encode(serial_connection.read());//This feeds the serial NMEA data into the library one char at a time
  }
  if(gps.location.isUpdated())//This will pretty much be fired all the time anyway but will at least reduce it to only after a package of NMEA data comes in
  {
    //Get the latest info from the gps object which it derived from the data sent by the GPS unit
    Serial.println("Satellite Count:");
    Serial.println(gps.satellites.value());
    Serial.println("Latitude:");
    Serial.println(gps.location.lat(), 6);
    Serial.println("Longitude:");
    Serial.println(gps.location.lng(), 6);
    Serial.println("Speed MPH:");
    Serial.println(gps.speed.mph());
    Serial.println("Altitude Feet:");
    Serial.println(gps.altitude.feet());
    Serial.println("");
  }
}

When you say “it did not work”, what do you mean? Does it give you an error or something?

Have you tried the basic example of the TinyGPSPlus library? (This one: https://github.com/mikalhart/TinyGPSPlus/blob/master/examples/BasicExample/BasicExample.ino) Let’s try one thing at a time to see if we can understand where the problem is. It might be super silly since it does not even use the gps hardware, but let’s start with the basic (no pun intended… well, maybe a little bit).

1 Like

I am able to obtain gps data from Quectel L80 now. The issue Im facing now is sending data on server. I already have Quectel L80 on pins 3&4 and want the Sim800l on 10&11. Since, two software serials cannot work at a time, the problem is I have to establish a connection each time I send data. How can I avoid this as it makes the Sim 800l reset and is not feasible.
Here’s my code for obtaining GPS data.

     #include "TinyGPS++.h"
    #include "SoftwareSerial.h"

    SoftwareSerial serial_connection(10, 11); //RX=pin 10, TX=pin 11
    TinyGPSPlus gps;//This is the GPS object that will pretty much do all the grunt work with the NMEA data
    void setup()
    {
      Serial.begin(9600);//This opens up communications to the Serial monitor in the Arduino IDE
      serial_connection.begin(9600);//This opens up communications to the GPS
      Serial.println("GPS Start");//Just show to the monitor that the sketch has started
    }

    void loop()
    {
      while(serial_connection.available())//While there are characters to come from the GPS
      {
        gps.encode(serial_connection.read());//This feeds the serial NMEA data into the library one char at a time
      }
      if(gps.location.isUpdated())//This will pretty much be fired all the time anyway but will at least reduce it to only after a package of NMEA data comes in
      {
        //Get the latest info from the gps object which it derived from the data sent by the GPS unit
        Serial.println("Satellite Count:");
        Serial.println(gps.satellites.value());
        Serial.println("Latitude:");
        Serial.println(gps.location.lat(), 6);
        Serial.println("Longitude:");
        Serial.println(gps.location.lng(), 6);
        Serial.println("Speed MPH:");
        Serial.println(gps.speed.mph());
        Serial.println("Altitude Feet:");
        Serial.println(gps.altitude.feet());
        Serial.println("");
      }
    }

Which module of the SIM800l are you using? Usually it comes with a dedicated RESET/ENABLE pin independent of the serial pins, so it shouldn’t reset when you begin or end a serial connection.

The other only way I can imagine to reset the SIM800 would be by sending the specific AT command to do it (AT+CFUN=1,1 if I’m not mistaken). Be sure you aren’t sending that command every time you start or end your serial connection to the SIM800l.