NEO 6M GPS No GPS data

Hello everyone, i have a NEO-6M GPS Module and using ESP - WROOM 32 for the microcontroller, and i cant seem to receive GPS data but i do have a Time and date received but it is all at default (Time - 0:0:0:0 ; Date - 0/0/2000) and for the GPS data, it only prints "Waiting for GPS Fix"

#include <TinyGPS++.h>

#define GPS_RX_PIN 16
#define GPS_TX_PIN 17

TinyGPSPlus gps;

HardwareSerial mySerial(1); 

unsigned long previousMillis = 0;  
const long interval = 1000;         

void setup() {
  Serial.begin(115200);
  
  mySerial.begin(9600, SERIAL_8N1, GPS_RX_PIN, GPS_TX_PIN);

  Serial.println("GPS Display Started");
}

void loop() {
  unsigned long currentMillis = millis();

  while (mySerial.available()) {
    char c = mySerial.read();
    gps.encode(c);
  }

  if (currentMillis - previousMillis >= interval) {
    previousMillis = currentMillis;

    if (gps.location.isUpdated()) {
      Serial.print("Latitude: ");
      Serial.print(gps.location.lat(), 6);
      Serial.print(" Longitude: ");
      Serial.println(gps.location.lng(), 6);
    } else {
      Serial.println("Waiting for GPS fix...");
    }
  }

  if (gps.date.isUpdated()) {
    Serial.print("Date: ");
    Serial.print(gps.date.month());
    Serial.print("/");
    Serial.print(gps.date.day());
    Serial.print("/");
    Serial.println(gps.date.year());
  }

  if (gps.time.isUpdated()) {
    Serial.print("Time: ");
    Serial.print(gps.time.hour());
    Serial.print(":");
    Serial.print(gps.time.minute());
    Serial.print(":");
    Serial.println(gps.time.second());
  }
}

I suggest to start with one of the TinyGPS++ library examples, and get that working first.

When testing, make sure you are outside, with a clear view of the sky, otherwise you cannot expect a valid location fix.

The number one tip for solving GPS issues is to take it outside and be sure it has a good view of the sky.

If it still does not get a fix outdoors, load and run this program;

#define GPS_RX_PIN 16
#define GPS_TX_PIN 17

HardwareSerial mySerial(1);

void setup()
{
  Serial.begin(115200);
  mySerial.begin(9600, SERIAL_8N1, GPS_RX_PIN, GPS_TX_PIN);
  Serial.println("GPS Display Started");
}


void loop()
{
  while (mySerial.available())
  {
    Serial.write(mySerial.read());
  }
}

It will copy the GPS output to the Serial monitor, so copy that output and post on here as text, do not post a screen image.

1 Like

Hello! This is what the output looks like:

$GNGLL,,,,,,V,N*7A

$GNRMC,,V,,,,,,,,,,N*4D

$GNVTG,,,,,,,,,N*2E

$GNGGA,,,,,,0,00,99.99,,,,,,*56

$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*2E

$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*2E

$GPGSV,1,1,00*79

$GLGSV,1,1,00*65

$GNGLL,,,,,,V,N*7A

Ln 20, Col 2

DOIT ESP32 DEVKIT V1

on COM13

The 'V' indicates "no lock". When locked, that will change to 'A'.

1 Like

The GPS cannot see any satellites.

Its either not outside with a good view of the sky or the GPS or antenna is faulty.

How long should i wait outside to have a sattelite lock?

If the GPS and its antenna are working properly and the GPS is outdoors with a good view of the sky the GPS should get a fix in about 45 seconds.

The $GPGSV sentences should start reporting there are satellites in view in about 15 seconds. See here for more info;

https://stuartsprojects.github.io/2018/10/01/My-GPS-does-not-work.html

1 Like

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