Neo-6M no GPS fix despite clear sky

Hello!

I am trying to get GPS location data with my Neo 6MV2 and Arduino Pro Mini 3.3V. I get perfectly fine NMEA messages from the Neo board in the serial monitor, but it never finds a GPS fix. I've had it lay under open, clear sky for an hour without any result. Does anyone have a clue to what's wrong?

Connections goes as following. The Neo board operates at 2.7-3.6V, just as the Arduino.
Neo-6M --> Arduino
VCC --> VCC
GND --> GND
RX --> 3
TX --> 4

#include <TinyGPS++.h>
#include <SoftwareSerial.h>

static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 9600;

// The TinyGPS++ object
TinyGPSPlus gps;

// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);

void setup(){
  Serial.begin(9600);
  ss.begin(GPSBaud);
}

void loop(){
  while (ss.available() > 0){
    gps.encode(ss.read());
    Serial.print("Latitude= "); 
    Serial.print(gps.location.lat(), 6);
    Serial.print(" Longitude= "); 
    Serial.println(gps.location.lng(), 6);
    delay(1000);
  }
}

The result is just
Latitude= 0.000000 Longitude= 0.000000
Latitude= 0.000000 Longitude= 0.000000
Latitude= 0.000000 Longitude= 0.000000
... in perpetuity

It is much easier to debug the raw GPS output. Post some examples of what this "echo" program prints, after the setup is outdoors, with a clear view of the sky, for some minutes.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); //(RX, TX) check correct pin assignments.

void setup() {
  mySerial.begin(9600);
  Serial.begin(9600);
  Serial.println("GPS start");
}

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

What Arduino board?

Please post a clear photo of your wiring.

Here's what it looked like with your code after 10 mins under clear sky. Although I went with mySerial(4, 3), because I haven't soldered on pin 10 and 11 on the Arduino yet. Why would that matter by the way?

19:59:28.149 -> $GPRMC,,V,,,,,,,,,,N*53
19:59:28.182 -> $GPVTG,,,,,,,,,N*30
19:59:28.215 -> $GPGGA,,,,,,0,00,99.99,,,,,,*48
19:59:28.248 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
19:59:28.282 -> $GPGSV,4,1,16,03,,,26,08,,,30,09,,,26,10,,,26*7F
19:59:28.348 -> $GPGSV,4,2,16,12,,,26,16,,,26,19,,,25,23,,,26*76
19:59:28.382 -> $GPGSV,4,3,16,24,,,26,25,,,26,27,,,26,28,,,26*77
19:59:28.448 -> $GPGSV,4,4,16,29,,,26,31,,,26,32,,,26,47,,,31*73
19:59:28.482 -> $GPGLL,,,,,,V,N*64
19:59:29.146 -> $GPRMC,,V,,,,,,,,,,N*53
19:59:29.179 -> $GPVTG,,,,,,,,,N*30
19:59:29.212 -> $GPGGA,,,,,,0,00,99.99,,,,,,*48
19:59:29.246 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
19:59:29.279 -> $GPGSV,4,1,16,03,,,26,08,,,28,09,,,26,10,,,26*76
19:59:29.345 -> $GPGSV,4,2,16,12,,,26,16,,,26,19,,,25,23,,,26*76
19:59:29.379 -> $GPGSV,4,3,16,24,,,26,25,,,26,27,,,26,28,,,26*77
19:59:29.445 -> $GPGSV,4,4,16,29,,,26,31,,,27,32,,,26,47,,,31*72
19:59:29.479 -> $GPGLL,,,,,,V,N*64

You can choose any free digital pins.

It looks like plenty of satellites are in view, but the module doesn't get a fix. Perhaps it is defective, or more likely counterfeit (lots of those for sale on cheap outlets).

For what it's worth, I'm having the exact same problem with an EM-406 GPS module. In my case, I doubt it's a hardware issue. I wrote the code several years ago, and that old copy works just fine. If I then take the same source code and recompile is without any changes, I get no compile errors, but suddenly the GPS can't get a satellite lock. even the example code that comes with the tinyGPS module fails to get a lock. I've been scratching my head over it for a couple of days now.

run the pass through sketch above

Well, that's a bummer. I wonder why they didn't save themselves the trouble of sending this junk in the first place. I bought it on eBay. But as far as I can see, most of these modules are located in China, and most of the sellers have established themselves with lots of positive feedback, as had the one I bought from. So the question is, how do you know what's a counterfeit and what's not?

Or just listen with PuTTY or CoolTerm or your favorite terminal emulator.

Nothing but desktop and module.

No fix but plenty of sentences = defective module

Or… one that has been told not to send those.

I don't see any lat/long sentences reading 0N by 0W or whatever it sez before it gets a fix.

Can you do a factory reset? To default verbosity &c.?

a7

Buy from a reputable dealer with good product support. A very large fraction of the crap you buy on eBay, Alibaba, etc. IS counterfeit, reject or recycled.

Wow, I've never been ripped off on a GPS module purchase, but it's been a few years...

I used the simpleTest example that comes with the library and got pretty much the same result as hjarnek when I enabled the raw GPS data.

It looks like the GPS is putting out proper sentences, but isn't getting a lock, so most of the data fields are empty.

The simple test also feeds the characters to the tiny GPS encode function. That is reporting that there are no checksum errors, but also no lock, as it should.

Normally, I would suspect that the RF side of the GPS receiver has failed so the unit is working, but can't hear anything. What confuses me is that I can get a valid lock if I swap out the processor for one containing code I downloaded to it three or four years ago, but not when I download the same code today.

I like to cut out the guesswork by looking only at raw NMEA if I am having problems.

1 Like

There are lots of reports of counterfeit NEO-6M GPS modules.

https://portal.u-blox.com/s/question/0D52p00008cihGkCAI/fake-or-real-neo6m

I always start there, because… I always have problems, and like to know 100 percent it isn't the hardware I am working with.

a7

I like to check that too. I usually use the test program that comes with the tinyGPS library because uncommenting one line makes it print out the raw data. The test also periodically dumps a status line from the encoder and the lat/long info any time the GPS reports a lock.

Hi.
Mikal Hart, the author of TinyGPS+, says do not use the delay() statement in your GPS sketches. He uses smartDelay():

// This custom version of delay() ensures that the gps object
// is being "fed".
static void smartDelay(unsigned long ms)
{
  unsigned long start = millis();
  do 
  {
    while (ss.available())
      gps.encode(ss.read());
  } while (millis() - start < ms);
}

But should the delay be called inside your while loop? Does gps.encode process a single byte? If so, you are putting a 1000 ms interval between each byte read.

We have to consider the GPS as a two component system: antenna & processor. The antenna is sensitive and can be easily damaged by bad handling practices. Can you post a pic of your entire setup? Or, at least a link to the ebay page?

Hi,
I'm not sure I understand the reasoning behind this, but anyway I tested with jremington's sketch above, which doesn't use any delay(), and still got no fix.

As for the antenna, it's one of those small ceramic antennas that comes included with the module. Ebay link appears to be broken. But can the problem really be the antenna when the chip outputs that it has lots of satellites in view? Shouldn't the problem be the module itself then?

If the chip is a counterfeit bogus ripoff, who is to say anything it says should be considered valid?

Just pay a bit more and get a real GPS unit from a reputable source.

for example.

I think you said you operate at 3.3 volts. If not, they have other modules.

Or shop at

They both will stand behind what they sell you.

a7

I'm quite new to electronics, and when my go-to dealer here in Sweden don't have what I'm looking for, I basically have no clue what other dealers are legitimate. And buying from US pages like the ones you posted a7, would mean shipping costs that far exceeds the cost of the item itself. So that's why I went with Ebay in this case. But I'd gladly accept tips about any reputable European, or internationally profiled dealers with low shipping costs.