Ublox neo 6m GPS - can't get a fix

Dear all,
I bough a gps module from ebay (ref: https://bit.ly/2JBhcfm) and connected to an Esp32 nodemcu board. The board is fully compatible with arduino IDE.
I think that the hardware & software is ok, since the gps is powered and I can print the GPS NMEA messages.

My problem is that I never get a fix, even waiting for 10-15 minutes.

The messages that I get are:

18:09:05.552 $GPGGA,,,,,,0,00,99.99,,,,,,*48 
18:09:05.554 $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30 
18:09:05.618 $GPGSV,1,1,01,08,,,14*75 
18:09:05.619 $GPGLL,,,,,,V,N*64 
18:09:06.539 $GPRMC,,V,,,,,,,,,,N*53 
18:09:06.539 $GPVTG,,,,,,,,,N*30

-- cut --

18:15:14.686 $GPGGA,,,,,,0,00,99.99,,,,,,*48 
18:15:14.687 $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30 
18:15:14.798 $GPGSV,2,1,06,13,,,22,14,,,21,15,,,21,17,,,20*7B 
18:15:14.801 $GPGSV,2,2,06,18,,,22,20,,,19*7C 
18:15:14.805 $GPGLL,,,,,,V,N*64 
18:15:15.693 $GPRMC,,V,,,,,,,,,,N*53 
18:15:15.693 $GPVTG,,,,,,,,,N*30

-- cut --

18:27:30.684 $GPGGA,,,,,,0,00,99.99,,,,,,*48 
18:27:30.686 $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30 
18:27:30.795 $GPGSV,2,1,08,02,,,22,08,,,22,09,,,21,15,,,22*76 
18:27:30.798 $GPGSV,2,2,08,16,,,22,20,,,21,23,,,21,27,,,22*70 
18:27:30.803 $GPGLL,,,,,,V,N*64 
18:27:31.661 $GPRMC,,V,,,,,,,,,,N*53 
18:27:31.662 $GPVTG,,,,,,,,,N*30

Please ignore the timestamp at the beginning as it is printed by the console terminal.
If I am right, the GPGSV message reports that a set of satellites is in view. The number of satellites varies, sometimes get to 8, sometimes drop to 5, and so on.

The sketch is pretty simple:

#include <HardwareSerial.h>
#include "BluetoothSerial.h"

BluetoothSerial SerialBT;
HardwareSerial MySerial(1);

void setup() {
	Serial.begin(115600);
    Serial.println(">>>>>>>>>>>>>>>>>> SETUP");
    MySerial.begin(9600, SERIAL_8N1, 16, 17);
    if(!SerialBT.begin("ESP32")){
        Serial.println("An error occurred initializing Bluetooth");
    }else{
        Serial.println("Bluetooth initialized");
    }
}

void loop() {
    while (MySerial.available() > 0) {
        uint8_t byteFromSerial = MySerial.read();
        Serial.write(byteFromSerial);
        // Do something
        char charFromSerial = (char)byteFromSerial;
        SerialBT.print(charFromSerial);
    }
}

The gps module is connected to the 3.3v pin (but using the 5v pin does not change the fix result).
The board is powered by a power bank. Powering the board with my laptop.. again, no luck.

This is the board pinout: https://cdn.instructables.com/FOL/YWLI/JEOILQ5U/FOLYWLIJEOILQ5U.LARGE.jpg
I am using pin 16-17 to get the serial output from the gps module. Nodemcu and gps module are connected to a breadboard and to some jumper wires (10cm or less).

The provided antenna is quite small but the gps module is outside. On the same exact position, my phone get more than 10 satellites and a 3d fix in no time.

I kept the sketch as simple as possible to avoid any other possible problem or side effect.

Can you, please, help me?
Do you think is it possible that this problem is library-related? Should I use a gps library or, at the end of the day, those libraries are just NMEA messages parsers?
Do you have any other suggestion that can help me get a fix?

Are these king of modules able to fix without connecting to a arduino board? Mine has a red led that is steady when powered (I don't know what will happen with the led once the fix is got).

Thanks in advance for any idea!

I guess if I had that problem, I would put a device, smart phone, etc., next to your device and see if it gets a GPS satellite fix.

Paul

majinjoko:
If I am right, the GPGSV message reports that a set of satellites is in view. The number of satellites varies, sometimes get to 8, sometimes drop to 5, and so on.

Yes, and the signals are reported as so weak that it could take a very long time to get a fix.

If the GPS is outdoors with a good view of the sky, then the GPS or its antenna are faulty (or not good enough)

On the same exact position, my phone get more than 10 satellites and a 3d fix in no time.

That is irrelavent, GPSs in phones work in a completly different way to standalone GPS and you cannot compare their performance.

i lately faced same issues like yours, powering the gps off the Lion battery ( with short soldered jump wires < 4 cm ) and using that 25mmx25mm antenna made the module get fix in 10 secs or less, indoors under the bed with < 3m accuracy

and if you are really serious with that project of yours, get the big antenna

Serial.begin(115600);

reevaluate that number. close enough to get data, far enough to present false readings

I don't understand, could you explain ?

115200

Serial speeds are not infinitely adjustable. they come in standard speeds, and 115600 is not one of them. try 115200 as noted above

115600 is close enough to 115200 to read nonsense.

AH IC.

Not sure of the implication of a potential 0.35% frequency error in the output to the serial monitor on a ESP32

It appears to be of no consequence as far as the OP is concerned, the copies of output that were posted do not indicate corrupt data to the serial monitor.

KASSIMSAMJI:
i lately faced same issues like yours, powering the gps off the Lion battery ( with short soldered jump wires < 4 cm ) and using that 25mmx25mm antenna made the module get fix in 10 secs or less, indoors under the bed with < 3m accuracy

A 10 second fix time is possible under 'hot fix' conditions when a GPS has previously downloaded the satellite data for its fix and its then stored the data in GPS backup, and that the data is no more than 2-3 hours old.

Under cold fix conditions, with a fresh power up and no previous GPS fix in the last couple of hours, the fastest a standalone GPS will get a fix is 30-35 seconds. There is a limitation as to how quick this can be due to the amount of bandwidth allocated to the download of the GPS satellite data.

Paul_KD7HB:
I would put a device
Paul

Well that's what I tried (as reported in the OP), very strong gps fix.

srnet:
If the GPS is outdoors with a good view of the sky, then the GPS or its antenna are faulty (or not good enough)

En plein air :slight_smile: Any way to identify whether the gps or the antenna is faulty, apart from buying a new one?

srnet:
That is irrelavent, GPSs in phones work in a completly different way to standalone GPS and you cannot compare their performance.

That's fine. It was not a matter of performance, but a simple approach to check whether there was gps signal in that position ("gps position".. you understand what I mean..)

KASSIMSAMJI:
and if you are really serious with that project of yours, get the big antenna

Ok but relax :slight_smile: As I wrote, I was outside, just testing the module as-is in the best conditions possible. In the final project I will surely look for a better antenna, but I could buy that later. Am I wrong?

Typo. Thanks!

srnet:
It appears to be of no consequence as far as the OP is concerned, the copies of output that were posted do not indicate corrupt data to the serial monitor.

The data is not corrupted in the serial monitor, but this is an error I will fix asap.

Well that's what I tried (as reported in the OP), very strong gps fix.

You really are miss-understanding completly the differance between how a mobile phone uses a GPS and how a standalone GPS works. It is entirely possible that you might believe a mobile phone has a 'very strong gps fix' but that a fully functioning standalone GPS will not get a fix in the same location, or it could take a very long time to do so.

I presume that when you say 'very strong gps fix' the phone is reporting the signals strengths for each of the GPS satellites, so how do they compare with the signal strengths you are getting from the Ublox GPS ?

Any way to identify whether the gps or the antenna is faulty, apart from buying a new one?

Sure, with a lot of very expensive lab equipment, you can identify and test for most things.

It was not a matter of performance, but a simple approach to check whether there was gps signal in that position

Sigh .......

There will be a 'GPS signal' in most place on the planet, even deep underground. The key issue is whether the signals are strong enough for the GPS to understand them.

For a standalone GPS to get a fix from cold it must first download the catalog of data on the GPS satellites. Under very weak signal conditions, even if the GPS can see the satellites, this download can take a very long time due to the weak signals causing persistent data errors.

A mobile phone or tablet can bypass the download of data from the GPS network by using various forms of GPS assist. The phone\tablet knows where it is on the globe so can download the required catalog of data from the mobile phones network or Internet connections. It can do this very quickly.

Hence a phone\tablet can give the illusion of 'very strong' signals, by getting a fast fix even when the GPS signals are weak.

Dear srnet,
thank you for your explanation.

At this point, since the phone is not a valid comparison, is there any possible reasonable approach to check whether the gps/antenna is faulty or not? (except the "with a lot of very expensive lab equipment" approach since I don't have any of this).

majinjoko:
At this point, since the phone is not a valid comparison, is there any possible reasonable approach to check whether the gps/antenna is faulty or not?

Compare it to another GPS, preferably one with a built in antenna.

The signal performance, and first fix times from cold, of a range of GPSs are reported on here;

GPS Performance Comparisons

Hi,

You are using a Neo6M module -> set the serial to 9 600.

Serial.begin(9600)

I have had the same problem, and solved it this way. 9 600 is fast enough to send plenty of NMEA frames.

Alex

AlexBZH:
Hi,

You are using a Neo6M module -> set the serial to 9 600.

Serial.begin(9600)

I have had the same problem, and solved it this way. 9 600 is fast enough to send plenty of NMEA frames.

Alex

Cant see how the baud rate output to the Serial monitor would affect the ability of the GPS te receive its data from the GPS satellites.

AlexBZH:
You are using a Neo6M module -> set the serial to 9 600.

Hi Alex.
Actually the serial is already set to 9600:

HardwareSerial MySerial(1);

void setup() {
	Serial.begin(115600);
    Serial.println(">>>>>>>>>>>>>>>>>> SETUP");
    MySerial.begin(9600, SERIAL_8N1, 16, 17);

There are three serials in my sketch:

  • Serial: the usb serial (the board program interface)
  • MySerial: hardware serial throught pins 16 and 17 that is connected to the gps module
  • SerialBt: bluetooth serial

MySerial is set to 9600, thank you anyway!

This is not a coding problem or a comms problem b/w the GPS & the Arduino.

Your GPS module is working, transmitting NMEA sentences which your sketch is receiving & putting to the IDE monitor. Well done to get to that point!

GPS is a deep subject. We need to understand each component & be able to prove that each component is working.

You are right that the "08" in the GSV sentence is the no. of satellites being seen. But see all those commas? The fields b/w them are empty. That's where you will see data when data is available. Comms is working -- baud rate is correct.

So the GPS module is working (power LED is on), it is transmitting data (NMEA sentences), the Arduino is receiving those correctly and putting them to the monitor.

The problem is why the GPS is not getting data.

Even tho "08" sats are being seen, their signal strength is inadequate for navigation purposes. So no fix.

Before you worry about that, please make use of u-blox's program "u-centre". Download it from their site. With this you can see much info about the performance of your GPS, such as the strength of the signals position of the sats. Once you try u-centre you'll always use it.