EM-406A output junk

Hey everyone,

I'm having some trouble configuring my EM-406A to output. About half of the time, the output is just junk. I have 3+ satellites in view, have tried all sorts of different baud rates, and searched all over and can't seem to figure it out. Here's some example output:

Current GPS: 2911.3540,08102.7931
Current GPS: ,,*1.3540,08102.7931
Current GPS: 2911.3528,08102.7938
Current GPS: 179,14,09,,044,15,24
Current GPS: 179,14,09,,044,15,24
Current GPS: 22,30,27,,12,,,,,,,3
Current GPS: 2911.3511,08102.7968

As you can see, the first, third and last are the only correct outputs. Here's the code I'm using on the Mega:

byteGPS = 0;
  i = 0;
  
  while(byteGPS != 42) {                   // read the GGA sentence
    byteGPS = mySerial.read();        
    inBuffer[i]=byteGPS;              
    i++; 
  }
   
  k = 1;
  m1 = 0;
  m2 = 0;
  
  while(inBuffer[k] != 42) {
    k++;
  
    if(k > 17 && k < 27) {
      //Serial.print(inBuffer[k]);            // write the GGA sentence
      currentGPSlat[m1] = inBuffer[k];
      m1++;      
    }
 
     if(k > 29 && k < 40) {
      //Serial.print(inBuffer[k]);            // write the GGA sentence
      currentGPSlong[m2] = inBuffer[k];
      m2++;      
    }   


Even when I'm just outputing the NMEA string, I get either a bunch of commas, or junk in general.

Any troubleshooting advice would be appriciated!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hi,
    I think I have the same issue as John. My 406a was giving me the same garbage ( binary ) fresh out of the box.

    John did you ever get this working with "putting-your-em406-gps-back-in" ?

    NB: the delivery of my GPS took about 3 days... So unless they set it to binary at the suppliers before shipping I dont know what to say...

    thanks!
    mac
  • I'm not indoors. I work on it at school and we're surrounded by tall buildings. Sometimes I'll get 4 satellites, but I don't think the problem is that, as I get accurate results sometimes.

    The EM406 is not in binary mode. It is blinking red as soon as it locks.
  • 3D Robotics
    Is your EM406 in binary mode? (no red LED). If so, that might explain it.
This reply was deleted.

Activity

Jose Araujo liked Jose Araujo's profile
Aug 29
spencer harvey liked spencer harvey's profile
Jul 9
More…