u-blox gps lea-6h / Mega2560

Good day

I am trying to interface a ublox lea-6h GPS module with the mega 2560 through a UART connection. The GPS module is already mounted on a breakout board with a PCB antenna and the appropriate voltage level converters. Here is a link of the product that I purchased: http://www.rfdesign.co.za/pages/5645456/Products/GPS-Products/Receiver-Boards.asp

I purchased this receiver board to make the interfacing easy. On this board there are only 6 pins. 5v, GND, RS232 Data out, RS232 Data in, TTL Data in and TTL data out. The board also has a mini USB connection used for configuration of the module. There is a layout of the PCB at the link above.

I decided to write a basic code to receive information form the GPS and check the response in the Arduino serial monitor, When I do this I only receive gibberish and random characters that make no sense at all. At first I thought it might be a mismatch in the baud rates, but I have made sure that the GPS and Serial baud rates match, the standard baud rate the GPS uses is 9600, which works for me. I have tried pretty much everything and can't figure out where the problem might be. I have also tried a basic program to write messages to UART port 1 and read it from UART port 0 through a serial moitor to make sure things work there, and that seems to work just fine.

Here is the code that I have used to test the module through UART:

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){
			byte data = Serial.read();
			//Serial.print(incoming,DEC);
			//Serial.print(incoming,HEX);
                        Serial.print(char(data));
                        Serial.print(",");
		}
		Serial.println(" ");
	}
}

I am not sure what exactly the GPS module sends the characters as, but I am pretty sure it is as characters.
U-blox also allows for the lea-6h to be configured through USB by the software u-center. In this software I have configured the baud rate to 9600 for the GPS module and to send only one message for testing which is the NMEA message GxRMC (Recommended Minimum Specific GNSS Data) . The software allows you to monitor the sent data in either a packet console, a binary console or a text console. And when I check this the right messages are being sent to the UART, so I think the problem might be on the Arduino side.

Here are a few links to screenshots to what I have explained above, just to give a clear understanding of what I did.
Message Configuration: http://img696.imageshack.us/img696/9324/messageconfiguration.png
Text console sent messages: http://img594.imageshack.us/img594/7472/textconsolermcmsg.png
Serial Monitor: http://img221.imageshack.us/img221/7756/serialmonitor.png

I have also tried connecting this module to the UNO with the exact same result. If anyone can help me with this I would really appreciate it.

You might want to check on the parity the gps chip uses for output. I recently have been working on a gps project using odd parity.

I'm not sure if I can help but I am attempting a similar project.

I have a ublox LEA-6 module but it is inside a antenova module (part number M10382). I have a Ethernet Arduino with a shield on it that contains the antenova GPS module. I find that I can connect to the GPS module using U-Center over the shield USB port. I can also connect to the GPS module from the Arduino using Software Serial on pins 5 & 6. I keep all the baud rates to 9600 N81 for testing and it does work.
I cannot seem to get the serial link to the Arduino running unless I have the USB connected to to the shield for some reason. Have you tried connecting both ports?
I also cannot figure out how to get the GPS module to start up under serial control only. For some reason it requires the USB connection.

You can see my project here:
http://www.seti.net/Cosmic%20Rays/Engineering/engineering.htm

The Arduino code that seems to work is

/*
Software serial multple serial test

Receives from VS 2012 app (hardware serial), sends to ERGO Shield (software serial).
Receives from ERGO Shield (software serial), sends to VS 2012 app (hardware serial).

The circuit: 
* RX is digital pin 5 (connect to TX of ERGO Shield)
* TX is digital pin 6 (connect to RX of ERGO Shield)

*/
#include <SoftwareSerial.h>

SoftwareSerial mySerial(5, 6); // RX, TX

void setup()  
{
	// Open serial communications and wait for port to open:
	Serial.begin(9600);
	mySerial.begin(9600);
	while (!Serial) {
		; // wait for serial port to connect. Needed for Leonardo only
	}
	Serial.println("G o o d   n i g h t   m o o n!");

}

void loop() // run over and over
{
	if (mySerial.available())
		Serial.write(mySerial.read());
	if (Serial.available())
		mySerial.write(Serial.read());

}

How to read COG and Velocity??(3D) from (3DR GPS uBlox LEA-6h-002) using APM 2.5?..

The connection is made by the SPI port (not the UART port), as shown in the following images:

http://s2.subirimagenes.com/otros/previo/thump_878803210.jpg
http://s2.subirimagenes.com/fotos/previo/thump_8788034dsc0053.jpg

Basically I need a code (Arduino IDE) to read the COG (Course Over Ground) and the velocity (3D), but I do not know how to build it. Is There an expert who can guide me please?

I use the 3dr gps module( u-blox gps lea-6h )and arduino UNO and have the similar results as shown in your photos. The output on serial port monitor is organized, only the content is gibberish. So I was wondering if it's the problem of data type? Is there any one can give me some advice?

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(" ");
  }
}