Quectel l86 module not getting valid data with esp32

Dear all,
I am sorry if this topic is covered elsewhere.
I have a problem making gps tracker using esp32 and l86 module. I am sure I almost tried everything I found on the internet. For example I use TiniGPS++ library and this code :

Using SoftwareSerial

#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#define rxGPS 16
#define txGPS 17
 
long lat, lon;
SoftwareSerial gpsSerial(rxGPS, txGPS);
TinyGPSPlus gps;
 
void setup()
{
  Serial.begin(9600); // connect serial
  gpsSerial.begin(9600); // connect gps sensor
}
 
void loop()
{
  while (gpsSerial.available())     // check for gps data
  {
    if (gps.encode(gpsSerial.read()))   // encode gps data
    {
      Serial.print("SATS: ");
      Serial.println(gps.satellites.value());
      Serial.print("LAT: ");
      Serial.println(gps.location.lat(), 6);
      Serial.print("LONG: ");
      Serial.println(gps.location.lng(), 6);
      Serial.print("ALT: ");
      Serial.println(gps.altitude.meters());
      Serial.print("SPEED: ");
      Serial.println(gps.speed.mps());
 
      Serial.print("Date: ");
      Serial.print(gps.date.day()); Serial.print("/");
      Serial.print(gps.date.month()); Serial.print("/");
      Serial.println(gps.date.year());
 
      Serial.print("Hour: ");
      Serial.print(gps.time.hour()); Serial.print(":");
      Serial.print(gps.time.minute()); Serial.print(":");
      Serial.println(gps.time.second());
      Serial.println("---------------------------");
      delay(4000);
    }
  }
}

Using HardwareSerial

#include <TinyGPS++.h>
#include <HardwareSerial.h>
#define rxGPS 16
#define txGPS 17
 
long lat, lon;
HardwareSerial gpsSerial(1);


TinyGPSPlus gps;
 
void setup()
{
  Serial.begin(9600); // connect serial
  gpsSerial.begin(9600, SERIAL_8N1, rxGPS, txGPS); // connect gps sensor
}
 
void loop()
{
  while (gpsSerial.available())     // check for gps data
  {
    if (gps.encode(gpsSerial.read()))   // encode gps data
    {
      Serial.print("SATS: ");
      Serial.println(gps.satellites.value());
      Serial.print("LAT: ");
      Serial.println(gps.location.lat(), 6);
      Serial.print("LONG: ");
      Serial.println(gps.location.lng(), 6);
      Serial.print("ALT: ");
      Serial.println(gps.altitude.meters());
      Serial.print("SPEED: ");
      Serial.println(gps.speed.mps());
 
      Serial.print("Date: ");
      Serial.print(gps.date.day()); Serial.print("/");
      Serial.print(gps.date.month()); Serial.print("/");
      Serial.println(gps.date.year());
 
      Serial.print("Hour: ");
      Serial.print(gps.time.hour()); Serial.print(":");
      Serial.print(gps.time.minute()); Serial.print(":");
      Serial.println(gps.time.second());
      Serial.println("---------------------------");
      delay(4000);
    }
  }
}

I connected VCC and V_BCKP to 3.3V esp32, RX to GPIO17 and TX to GPIO16.

Result :

Please help me figure out where is the problem.

Best regards,
Nur Ardli Rachmat Saputra

here is my refferences with that code

can you display the raw NEMA data?
where is the antenna - place it outside or near to a window

do u mean Serial.read() data? i'll go capture it
the antenna is built in with l86 right? i tried this outdoor. i can send my picture testing it

the $GPGAA log does not appear to be showing your latitude and longitude - in particular the number of satelites appears to be 0
it may take a few minutes to get a fix?
edit: looking at the photo there appears to be a lot of metal around which can shiled the antenna
put the antenna as high as you can clear of any metal obstructions


this is now

edit : how to read raw NMEA data?

the $GPGAA is now showing latitude and longitude and 7 satelites
your original program should now work

OMG, how can this make my program work. I spent like 3 days with no result. Thank you very much Horace. May good fortune be with you.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.