u-blox gps lea-6h / Mega2560

I have similar project and used your code.

My gps module is "happymodel LEA-6H" and I've changed a littile in your code and it worked!

Here is my version:

void setup()
{
  Serial.begin(9600);
  Serial.print("Begin GPS Test"); // Text to make sure serial monitor reads at correct baud rate.
}

void loop()
{
  if (Serial.available() > 0)
  {
    delay(30);
    while (Serial.available() > 0) {
      char data = Serial.read();
      //Serial.print(incoming,DEC);
      //Serial.print(incoming,HEX);
      Serial.print((data));
      //Serial.print(",");
    }
    //Serial.println(" ");
  }
}