Problem with interfacing neo-6m gps module with arduino mega 2560

I have been trying to interface NEO-6M GPS MODULE with Arduino Mega, before I could proceed I went through all previous post regarding the same and none matches with the problem I am facing right now. So I am starting a new thread

I am using Mikal Hart gps library and the code is given below, connections are

vcc of gps to 3.3v of arduino mega 2560
gnd of gps to gnd of arduino mega 2560
rx of gps to tx3(14th pin of arduino mega 2560)// Serial3
tx of gps to rx3(15th pin of arduino mega 2560)// Serial3

Arduino Example code from library I am using is

#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
/*
   This sample code demonstrates the normal use of a TinyGPSPlus (TinyGPSPlus) object.
   It requires the use of SoftwareSerial, and aSerial3umes that you have a
   4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 9600;

// The TinyGPSPlus object
TinyGPSPlus gps;

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

void setup()
{
  Serial.begin(115200);
  Serial3.begin(GPSBaud);

  Serial.println(F("FullExample.ino"));
  Serial.println(F("An extensive example of many interesting TinyGPSPlus features"));
  Serial.print(F("Testing TinyGPSPlus library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
  Serial.println(F("by Mikal Hart"));
  Serial.println();
  Serial.println(F("Sats HDOP  Latitude   Longitude   Fix  Date       Time     Date Alt    Course Speed Card  Distance Course Card  Chars Sentences Checksum"));
  Serial.println(F("           (deg)      (deg)       Age                      Age  (m)    --- from GPS ----  ---- to London  ----  RX    RX        Fail"));
  Serial.println(F("----------------------------------------------------------------------------------------------------------------------------------------"));
}

void loop()
{
  static const double LONDON_LAT = 51.508131, LONDON_LON = -0.128002;

  printInt(gps.satellites.value(), gps.satellites.isValid(), 5);
  printFloat(gps.hdop.hdop(), gps.hdop.isValid(), 6, 1);
  printFloat(gps.location.lat(), gps.location.isValid(), 11, 6);
  printFloat(gps.location.lng(), gps.location.isValid(), 12, 6);
  printInt(gps.location.age(), gps.location.isValid(), 5);
  printDateTime(gps.date, gps.time);
  printFloat(gps.altitude.meters(), gps.altitude.isValid(), 7, 2);
  printFloat(gps.course.deg(), gps.course.isValid(), 7, 2);
  printFloat(gps.speed.kmph(), gps.speed.isValid(), 6, 2);
  printStr(gps.course.isValid() ? TinyGPSPlus::cardinal(gps.course.deg()) : "*** ", 6);

  unsigned long distanceKmToLondon =
    (unsigned long)TinyGPSPlus::distanceBetween(
      gps.location.lat(),
      gps.location.lng(),
      LONDON_LAT, 
      LONDON_LON) / 1000;
  printInt(distanceKmToLondon, gps.location.isValid(), 9);

  double courseToLondon =
    TinyGPSPlus::courseTo(
      gps.location.lat(),
      gps.location.lng(),
      LONDON_LAT, 
      LONDON_LON);

  printFloat(courseToLondon, gps.location.isValid(), 7, 2);

  const char *cardinalToLondon = TinyGPSPlus::cardinal(courseToLondon);

  printStr(gps.location.isValid() ? cardinalToLondon : "*** ", 6);

  printInt(gps.charsProcessed(), true, 6);
  printInt(gps.sentencesWithFix(), true, 10);
  printInt(gps.failedChecksum(), true, 9);
  Serial.println();
  
  smartDelay(1000);

  if (millis() > 5000 && gps.charsProcessed() < 10)
    Serial.println(F("No GPS data received: check wiring"));
}

// 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 (Serial3.available())
      gps.encode(Serial3.read());
  } while (millis() - start < ms);
}

static void printFloat(float val, bool valid, int len, int prec)
{
  if (!valid)
  {
    while (len-- > 1)
      Serial.print('*');
    Serial.print(' ');
  }
  else
  {
    Serial.print(val, prec);
    int vi = abs((int)val);
    int flen = prec + (val < 0.0 ? 2 : 1); // . and -
    flen += vi >= 1000 ? 4 : vi >= 100 ? 3 : vi >= 10 ? 2 : 1;
    for (int i=flen; i<len; ++i)
      Serial.print(' ');
  }
  smartDelay(0);
}

static void printInt(unsigned long val, bool valid, int len)
{
  char sz[32] = "*****************";
  if (valid)
    sprintf(sz, "%ld", val);
  sz[len] = 0;
  for (int i=strlen(sz); i<len; ++i)
    sz[i] = ' ';
  if (len > 0) 
    sz[len-1] = ' ';
  Serial.print(sz);
  smartDelay(0);
}

static void printDateTime(TinyGPSDate &d, TinyGPSTime &t)
{
  if (!d.isValid())
  {
    Serial.print(F("********** "));
  }
  else
  {
    char sz[32];
    sprintf(sz, "%02d/%02d/%02d ", d.month(), d.day(), d.year());
    Serial.print(sz);
  }
  
  if (!t.isValid())
  {
    Serial.print(F("******** "));
  }
  else
  {
    char sz[32];
    sprintf(sz, "%02d:%02d:%02d ", t.hour(), t.minute(), t.second());
    Serial.print(sz);
  }

  printInt(d.age(), d.isValid(), 5);
  smartDelay(0);
}

static void printStr(const char *str, int len)
{
  int slen = strlen(str);
  for (int i=0; i<len; ++i)
    Serial.print(i<slen ? str[i] : ' ');
  smartDelay(0);
}

And the output in the serial monitor as of now is

08:06:03.079 -> FullExample.ino
08:06:03.079 -> An extensive example of many interesting TinyGPSPlus features
08:06:03.079 -> Testing TinyGPSPlus library v. 1.0.2
08:06:03.079 -> by Mikal Hart
08:06:03.112 -> 
08:06:03.112 -> Sats HDOP  Latitude   Longitude   Fix  Date       Time     Date Alt    Course Speed Card  Distance Course Card  Chars Sentences Checksum
08:06:03.112 ->            (deg)      (deg)       Age                      Age  (m)    --- from GPS ----  ---- to London  ----  RX    RX        Fail
08:06:03.112 -> ----------------------------------------------------------------------------------------------------------------------------------------
08:06:03.145 -> **** ***** ********** *********** **** ********** ******** **** ****** ****** ***** ***   ******** ****** ***   0     0         0        
08:06:04.146 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 256  ****** ****** ***** ***   ******** ****** ***   195   0         0        
08:06:05.144 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 261  ****** ****** ***** ***   ******** ****** ***   357   0         0        
08:06:06.142 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 267  ****** ****** ***** ***   ******** ****** ***   519   0         0        
08:06:07.174 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 273  ****** ****** ***** ***   ******** ****** ***   681   0         0        
08:06:08.173 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 280  ****** ****** ***** ***   ******** ****** ***   843   0         0        
08:06:09.172 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 286  ****** ****** ***** ***   ******** ****** ***   1005  0         0        
08:06:10.170 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 292  ****** ****** ***** ***   ******** ****** ***   1167  0         0        
08:06:11.168 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 298  ****** ****** ***** ***   ******** ****** ***   1329  0         0        
08:06:12.200 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 303  ****** ****** ***** ***   ******** ****** ***   1491  0         0        
08:06:13.198 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 308  ****** ****** ***** ***   ******** ****** ***   1653  0         0        
08:06:14.196 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 315  ****** ****** ***** ***   ******** ****** ***   1823  0         0        
08:06:15.193 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 321  ****** ****** ***** ***   ******** ****** ***   1985  0         0        
08:06:16.225 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 326  ****** ****** ***** ***   ******** ****** ***   2147  0         0        
08:06:17.222 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 334  ****** ****** ***** ***   ******** ****** ***   2309  0         0        
08:06:18.221 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 342  ****** ****** ***** ***   ******** ****** ***   2471  0         0        
08:06:19.219 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 346  ****** ****** ***** ***   ******** ****** ***   2633  0         0        
08:06:20.222 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 353  ****** ****** ***** ***   ******** ****** ***   2795  0         0        
08:06:21.253 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 358  ****** ****** ***** ***   ******** ****** ***   2957  0         0        
08:06:22.252 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 364  ****** ****** ***** ***   ******** ****** ***   3119  0         0        
08:06:23.254 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 368  ****** ****** ***** ***   ******** ****** ***   3281  0         0        
08:06:24.251 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 377  ****** ****** ***** ***   ******** ****** ***   3443  0         0        
08:06:25.282 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 383  ****** ****** ***** ***   ******** ****** ***   3605  0         0        
08:06:26.280 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 389  ****** ****** ***** ***   ******** ****** ***   3767  0         0        
08:06:27.278 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 395  ****** ****** ***** ***   ******** ****** ***   3929  0         0        
08:06:28.278 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 401  ****** ****** ***** ***   ******** ****** ***   4091  0         0        
08:06:29.276 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 408  ****** ****** ***** ***   ******** ****** ***   4253  0         0        
08:06:30.307 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 413  ****** ****** ***** ***   ******** ****** ***   4415  0         0        
08:06:31.304 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 420  ****** ****** ***** ***   ******** ****** ***   4577  0         0        
08:06:32.302 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 425  ****** ****** ***** ***   ******** ****** ***   4739  0         0        
08:06:33.301 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 431  ****** ****** ***** ***   ******** ****** ***   4901  0         0        
08:06:34.332 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 439  ****** ****** ***** ***   ******** ****** ***   5063  0         0        
08:06:35.330 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 443  ****** ****** ***** ***   ******** ****** ***   5225  0         0        
08:06:36.328 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 449  ****** ****** ***** ***   ******** ****** ***   5387  0         0        
08:06:37.326 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 456  ****** ****** ***** ***   ******** ****** ***   5549  0         0        
08:06:38.358 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 462  ****** ****** ***** ***   ******** ****** ***   5711  0         0        
08:06:39.357 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 468  ****** ****** ***** ***   ******** ****** ***   5873  0         0        
08:06:40.355 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 474  ****** ****** ***** ***   ******** ****** ***   6035  0         0        
08:06:41.353 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 480  ****** ****** ***** ***   ******** ****** ***   6197  0         0        
08:06:42.385 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 487  ****** ****** ***** ***   ******** ****** ***   6359  0         0        
08:06:43.383 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 493  ****** ****** ***** ***   ******** ****** ***   6521  0         0        
08:06:44.381 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 498  ****** ****** ***** ***   ******** ****** ***   6683  0         0        
08:06:45.378 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 505  ****** ****** ***** ***   ******** ****** ***   6853  0         0        
08:06:46.376 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 510  ****** ****** ***** ***   ******** ****** ***   7015  0         0        
08:06:47.408 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 517  ****** ****** ***** ***   ******** ****** ***   7185  0         0        
08:06:48.408 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 522  ****** ****** ***** ***   ******** ****** ***   7347  0         0        
08:06:49.406 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 529  ****** ****** ***** ***   ******** ****** ***   7509  0         0        
08:06:50.403 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 535  ****** ****** ***** ***   ******** ****** ***   7671  0         0        
08:06:51.434 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 542  ****** ****** ***** ***   ******** ****** ***   7833  0         0        
08:06:52.432 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 548  ****** ****** ***** ***   ******** ****** ***   7995  0         0        
08:06:53.430 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 553  ****** ****** ***** ***   ******** ****** ***   8157  0         0        
08:06:54.428 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 559  ****** ****** ***** ***   ******** ****** ***   8319  0         0        
08:06:55.460 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 564  ****** ****** ***** ***   ******** ****** ***   8481  0         0        
08:06:56.458 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 571  ****** ****** ***** ***   ******** ****** ***   8643  0         0        
08:06:57.456 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 577  ****** ****** ***** ***   ******** ****** ***   8805  0         0        
08:06:58.454 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 583  ****** ****** ***** ***   ******** ****** ***   8967  0         0        
08:06:59.458 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 590  ****** ****** ***** ***   ******** ****** ***   9129  0         0        
08:07:00.491 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 595  ****** ****** ***** ***   ******** ****** ***   9291  0         0        
08:07:01.488 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 602  ****** ****** ***** ***   ******** ****** ***   9453  0         0        
08:07:02.490 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 608  ****** ****** ***** ***   ******** ****** ***   9615  0         0        
08:07:03.487 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 615  ****** ****** ***** ***   ******** ****** ***   9777  0         0        
08:07:04.485 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 619  ****** ****** ***** ***   ******** ****** ***   9947  0         0        
08:07:05.515 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 625  ****** ****** ***** ***   ******** ****** ***   10109 0         0        
08:07:06.519 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 633  ****** ****** ***** ***   ******** ****** ***   10271 0         0        
08:07:07.518 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 637  ****** ****** ***** ***   ******** ****** ***   10433 0         0        
08:07:08.516 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 644  ****** ****** ***** ***   ******** ****** ***   10595 0         0        
08:07:09.547 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 650  ****** ****** ***** ***   ******** ****** ***   10757 0         0        
08:07:10.545 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 656  ****** ****** ***** ***   ******** ****** ***   10919 0         0        
08:07:11.543 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 661  ****** ****** ***** ***   ******** ****** ***   11081 0         0        
08:07:12.541 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 668  ****** ****** ***** ***   ******** ****** ***   11243 0         0        
08:07:13.572 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 674  ****** ****** ***** ***   ******** ****** ***   11405 0         0        
08:07:14.570 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 680  ****** ****** ***** ***   ******** ****** ***   11567 0         0        
08:07:15.570 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 686  ****** ****** ***** ***   ******** ****** ***   11729 0         0        
08:07:16.568 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 693  ****** ****** ***** ***   ******** ****** ***   11891 0         0        
08:07:17.565 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 699  ****** ****** ***** ***   ******** ****** ***   12053 0         0        
08:07:18.597 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 705  ****** ****** ***** ***   ******** ****** ***   12215 0         0        
08:07:19.595 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 711  ****** ****** ***** ***   ******** ****** ***   12377 0         0        
08:07:20.594 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 716  ****** ****** ***** ***   ******** ****** ***   12539 0         0        
08:07:21.592 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 722  ****** ****** ***** ***   ******** ****** ***   12701 0         0        
08:07:22.601 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 730  ****** ****** ***** ***   ******** ****** ***   12863 0         0        
08:07:23.633 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 734  ****** ****** ***** ***   ******** ****** ***   13025 0         0        
08:07:24.630 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 741  ****** ****** ***** ***   ******** ****** ***   13187 0         0        
08:07:25.628 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 747  ****** ****** ***** ***   ******** ****** ***   13349 0         0        
08:07:26.628 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 753  ****** ****** ***** ***   ******** ****** ***   13519 0         0        
08:07:27.626 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 759  ****** ****** ***** ***   ******** ****** ***   13681 0         0        
08:07:28.657 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 766  ****** ****** ***** ***   ******** ****** ***   13843 0         0        
08:07:29.654 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 771  ****** ****** ***** ***   ******** ****** ***   14005 0         0        
08:07:30.652 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 777  ****** ****** ***** ***   ******** ****** ***   14175 0         0        
08:07:31.650 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 784  ****** ****** ***** ***   ******** ****** ***   14337 0         0        
08:07:32.682 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 789  ****** ****** ***** ***   ******** ****** ***   14499 0         0        
08:07:33.679 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 795  ****** ****** ***** ***   ******** ****** ***   14661 0         0        
08:07:34.677 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 802  ****** ****** ***** ***   ******** ****** ***   14823 0         0        
08:07:35.674 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 808  ****** ****** ***** ***   ******** ****** ***   14985 0         0        
08:07:36.705 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 814  ****** ****** ***** ***   ******** ****** ***   15147 0         0        
08:07:37.703 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 820  ****** ****** ***** ***   ******** ****** ***   15309 0         0        
08:07:38.706 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 826  ****** ****** ***** ***   ******** ****** ***   15471 0         0        
08:07:39.703 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 830  ****** ****** ***** ***   ******** ****** ***   15633 0         0        
08:07:40.735 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 839  ****** ****** ***** ***   ******** ****** ***   15795 0         0        
08:07:41.731 -> 0    100.0  ********** *********** **** 00/00/2000 00:00:00 844  ****** ****** ***** ***   ******** ****** ***   15957 0     

Can anyone help me in this?

From the software serial reference.

Not all pins on the Mega and Mega 2560 boards support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69). Not all pins on the Leonardo and Micro boards support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

There is no reason to use software serial on a Mega. There are 3 extra hardware serial ports available. Hardware serial is always preferred over software serial.

I just had a whole discussion about this same subject, here. Problem with Neo 6M and Arduino Mega 2560

Try the test code and post the results. Connect GPS TX to Mega pin 19. GPS RX need not to be connected.

//gps test
// connect GPS TX to Mega pin 19 (RX1)  GPS RX not connected

void setup()
{
   // Open serial communications
   Serial.begin(9600);  
   Serial1.begin(9600);
   Serial.print("Mega up");
}

void loop()
{
   if (Serial1.available())
   {
      Serial.print(char(Serial1.read()));
   }
}

Yeah, I am aware, and I commented out the SoftwareSerial header line, if you had checked it.

Thank you

And also since it is mega, I am using Serial3 for which the output from the serial monitor is what I have posted, Thanks for taking time to reply

OK, sorry.

Try the test code. That tells us if the GPS is communicating with the Mega.

09:04:38.219 -> Meg
09:04:38.219 -> $GPGSV,1,1,00*79
09:04:38.219 -> $GPGLL,,,,,033437.00,V,N*4A
09:04:38.892 -> Mega up$GPRMC,033439.00,V,,,,,,,080522,,,N*7E
09:04:39.091 -> $GPVTG,,,,,,,,,N*30
09:04:39.125 -> $GPGGA,033439.00,,,,,0,00,99.99,,,,,,*68
09:04:39.158 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:39.225 -> $GPGSV,1,1,01,09,,,20*73
09:04:39.258 -> $GPGLL,,,,,033439.00,V,N*44
09:04:40.056 -> $GPRMC,033440.00,V,,,,,,,080522,,,N*70
09:04:40.089 -> $GPVTG,,,,,,,,,N*30
09:04:40.122 -> $GPGGA,033440.00,,,,,0,00,99.99,,,,,,*66
09:04:40.156 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:40.222 -> $GPGSV,1,1,01,09,,,18*78
09:04:40.255 -> $GPGLL,,,,,033440.00,V,N*4A
09:04:41.053 -> $GPRMC,033441.00,V,,,,,,,080522,,,N*71
09:04:41.120 -> $GPVTG,,,,,,,,,N*30
09:04:41.120 -> $GPGGA,033441.00,,,,,0,00,99.99,,,,,,*67
09:04:41.169 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:41.214 -> $GPGSV,1,1,01,09,,,11*71
09:04:41.256 -> $GPGLL,,,,,033441.00,V,N*4B
09:04:42.250 -> $GPRMC,033442.00,V,,,,,,,080522,,,N*72
09:04:42.283 -> $GPVTG,,,,,,,,,N*30
09:04:42.283 -> $GPGGA,033442.00,,,,,0,00,99.99,,,,,,*64
09:04:42.350 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:42.399 -> $GPGSV,1,1,00*79
09:04:42.399 -> $GPGLL,,,,,033442.00,V,N*48
09:04:43.048 -> $GPRMC,033443.00,V,,,,,,,080522,,,N*73
09:04:43.115 -> $GPVTG,,,,,,,,,N*30
09:04:43.115 -> $GPGGA,033443.00,,,,,0,00,99.99,,,,,,*65
09:04:43.182 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:43.215 -> $GPGSV,1,1,00*79
09:04:43.248 -> $GPGLL,,,,,033443.00,V,N*49
09:04:44.080 -> $GPRMC,033444.00,V,,,,,,,080522,,,N*74
09:04:44.113 -> $GPVTG,,,,,,,,,N*30
09:04:44.113 -> $GPGGA,033444.00,,,,,0,00,99.99,,,,,,*62
09:04:44.180 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:44.213 -> $GPGSV,1,1,01,11,,,24*7E
09:04:44.246 -> $GPGLL,,,,,033444.00,V,N*4E
09:04:45.078 -> $GPRMC,033445.00,V,,,,,,,080522,,,N*75
09:04:45.111 -> $GPVTG,,,,,,,,,N*30
09:04:45.111 -> $GPGGA,033445.00,,,,,0,00,99.99,,,,,,*63
09:04:45.178 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:45.211 -> $GPGSV,1,1,00*79
09:04:45.244 -> $GPGLL,,,,,033445.00,V,N*4F
09:04:46.075 -> $GPRMC,033446.00,V,,,,,,,080522,,,N*76
09:04:46.108 -> $GPVTG,,,,,,,,,N*30
09:04:46.141 -> $GPGGA,033446.00,,,,,0,00,99.99,,,,,,*60
09:04:46.174 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:46.207 -> $GPGSV,1,1,00*79
09:04:46.241 -> $GPGLL,,,,,033446.00,V,N*4C
09:04:47.072 -> $GPRMC,033447.00,V,,,,,,,080522,,,N*77
09:04:47.105 -> $GPVTG,,,,,,,,,N*30
09:04:47.138 -> $GPGGA,033447.00,,,,,0,00,99.99,,,,,,*61
09:04:47.171 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:47.204 -> $GPGSV,1,1,00*79
09:04:47.238 -> $GPGLL,,,,,033447.00,V,N*4D
09:04:48.235 -> $GPRMC,033448.00,V,,,,,,,080522,,,N*78
09:04:48.269 -> $GPVTG,,,,,,,,,N*30
09:04:48.302 -> $GPGGA,033448.00,,,,,0,00,99.99,,,,,,*6E
09:04:48.335 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:48.371 -> $GPGSV,1,1,00*79
09:04:48.402 -> $GPGLL,,,,,033448.00,V,N*42
09:04:49.067 -> $GPRMC,033449.00,V,,,,,,,080522,,,N*79
09:04:49.104 -> $GPVTG,,,,,,,,,N*30
09:04:49.139 -> $GPGGA,033449.00,,,,,0,00,99.99,,,,,,*6F
09:04:49.166 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:49.233 -> $GPGSV,1,1,00*79
09:04:49.233 -> $GPGLL,,,,,033449.00,V,N*43
09:04:50.077 -> $GPRMC,033450.00,V,,,,,,,080522,,,N*71
09:04:50.098 -> $GPVTG,,,,,,,,,N*30
09:04:50.131 -> $GPGGA,033450.00,,,,,0,00,99.99,,,,,,*67
09:04:50.164 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:50.231 -> $GPGSV,1,1,00*79
09:04:50.231 -> $GPGLL,,,,,033450.00,V,N*4B
09:04:51.062 -> $GPRMC,033451.00,V,,,,,,,080522,,,N*70
09:04:51.095 -> $GPVTG,,,,,,,,,N*30
09:04:51.128 -> $GPGGA,033451.00,,,,,0,00,99.99,,,,,,*66
09:04:51.162 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:51.228 -> $GPGSV,1,1,00*79
09:04:51.228 -> $GPGLL,,,,,033451.00,V,N*4A
09:04:52.062 -> $GPRMC,033452.00,V,,,,,,,080522,,,N*73
09:04:52.097 -> $GPVTG,,,,,,,,,N*30
09:04:52.128 -> $GPGGA,033452.00,,,,,0,00,99.99,,,,,,*65
09:04:52.161 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:52.228 -> $GPGSV,1,1,00*79
09:04:52.228 -> $GPGLL,,,,,033452.00,V,N*49
09:04:53.060 -> $GPRMC,033453.00,V,,,,,,,080522,,,N*72
09:04:53.094 -> $GPVTG,,,,,,,,,N*30
09:04:53.133 -> $GPGGA,033453.00,,,,,0,00,99.99,,,,,,*64
09:04:53.160 -> $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30
09:04:53.227 -> $GPGSV,1,1,00*79
09:04:53.227 -> $GPGLL,,,,,033453.00,V,N*48
09:04:54.224 -> $GPRMC,033454.00,V,,,,,,,080522,,,N*75

OK, you have communication, but not a satellite lock. Is the GPS outdoors with a clear view of the sky? That means no trees or heavy clouds.

It is picking up the time (033442.00) so it is seeing at least one satellite, just not enough to get a valid position.

It is unlikely to work indoors. Just like the thread that I linked.

Got it fixed, at first I was in a place wherein sky opening was very less, then I read your reply that even cloud could do the damage That means no trees or heavy clouds.

Striked my mind and went totally to a open lawn to check and works like a charm. Thank you everyone

OK, sorry.

Try the test code. That tells us if the GPS is communicating with the Mega.

please dont be sorry, as you are helping me without any returns that means a lot.

Now does this open sky means everytime I would have to be on totally open space??

GPS will always work better with a clear unobstructed view of the whole sky. It may work under less than ideal conditions. For instance, some days my Neo6M will work sitting at my desk in my house, but some days (like tonight) it will not get a lock. It will usually work in my car. Remember that the satellites are at least 20,000 kilometers away and the signal is not very strong so it takes little to degrade the signal.

GPS will always work better with a clear unobstructed view of the whole sky. It may work under less than ideal conditions. For instance, some days my Neo6M will work sitting at my desk in my house, but some days (like tonight) it will not get a lock. It will usually work in my car. Remember that the satellites are at least 20,000 kilometers away and the signal is not very strong so it takes little to degrade the signal.


Got a lot of insight on the concept of GPS, tried this before 4 years and left out without success and tried again now with your guidance got it done, For all the people who are working first time with Gps module, here is the lesson I have learnt from arduino forum people and experience

  1. Please start trying outdoors (open sky) no compromise
    2.Check whether you are using Arduino Mega or Arduino Uno or Nano or other boards, the code, circuit, setup differs a lot, watch out for it
    3.Sometimes interchanging the wires between rx and tx gives you more insight about the problem you are facing
  2. Antennas are must for GPS dont leave it at any cost
  3. Better to connect with 3.3 volt instead of 5 volt initially, as many clone board doesn't possess 3.3 volt, voltage regulator and you may burn the board

If there are any more troubleshooting technique which I might know, will share again

Thanks arduino forum

1 Like

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