Serial2 read errors

I’m connecting a GPS (MTK3339) to the second serial port. For the most part it works, but I’ve noticed I had a high error rate on GPS updates. I’ve ditched all libraries and reduced everything to a simple read loop (see on the bottom). It seems that there are number of characters getting missed or injected. For eg:


The first line shouldn’t start with 00, and the second is missing a newline (and a checksum on the first GPS sentence), while the 3rd and 4th have an extra newline. I’m connecting rx, tx, and gnd. I’ve tried reading the MTK3339’s serial with other devices (my computer, raspberry pi, different arduinos) and none of them seem to exhibit this issue.

Does anyone have any pointers where to look or what could be going wrong?


void setup() {
  Serial.println("GPS test");

void loop() {
  if (Serial2.available()) {
    char c =;

Usually in these scenarios I double double check the signals using a scope. Is it possible to get a scope trace to ensure the signal is transmitting properly over the serial bus?

I don’t have access to a scope, but I tried the closest thing I could think of: I stole signal straight from the Dash’ Serial2 TX pin and brought it to a separate serial port (common ground), basically mirroring what’s being sent to Dash. The mirror serial port receives everything in tact.

“Separate serial port” in this case is an external device like a USB-to-serial converter plugged into a computer?

So you’re thinking that the Serial2 hardware may be malfunctioning?

Any chance you have a second Dash on hand to swap out and try?

Sorry, that wasn’t clear. That’s right, I broke it out to a serial USB converter.

I don’t want to be too fast to blame the Dash, but it certainly seems that way. I also have some intermittent problems with the built-in USB serial side (there is another thread on here … it renders my USB ports useless until I reboot my machine. Maybe it shorts them somehow?). I don’t think these were related, but I wonder.

I don’t have a second Dash, but I did order a scope, so I’ll get a trace once it gets here.

I might also order a new Dash, mine is older, one of the early post-pro designs. It doesn’t look like any of the diagrams/pictures on the site, but the pinouts match the 1.1 version.

Thank you for your help so far.

Hi Chris, here are couple of images from scope off the pin on Dash. To me it looks pretty good, but you might see something I’m missing. Any suggestions are very welcome.



Actually that looks pretty good.

What is the transmit speed? 115,200?

I’m using 9600

Hi - I get exactly the same at 9600, running the same code as you. I have had a look on a scope with a serial decoder and everything looks just fine. The serial decoder decodes the data from the scope as it should.

The dash gets the data in and reads:


Ah… I see what the problem is… Basically you are getting in each char with a loop in between. Every time it passes the “loop” it misses time and if there is a char on it’s way in when it loops. that char gets missed.

This works for me on 38400 but I would think it still works on 9600. I will give that a go too.
So - instead of the “IF”, use “WHILE” to stop it from jumping through the loop to the start again.

void setup() {
Serial.println(“GPS test”);

void loop() {
while (Serial2.available())


Edit to say that 9600 worked for me too. :slight_smile:

1 Like

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