Increased SERIAL_BUFFER_SIZE to no effect

sean_8:

KeithRB:
We need all your code. Are you using Serial or Software Serial for your reading?

All the code would be way too long to paste. I am using Serial.

Then attach it to your post, or make a minimal sketch that shows the failure.

holmes4:
All (lower case) string in c are terminated by a null char '\0' . Your not doing this so println if goofing up. you also need to take car of the linefeed char.

In the device schematics it specifically says the NMEA sentence is terminated with a (which is why I have the switch statement). The NMEA port is constantly printing (every second), it never stops. I'm unsure what println you are referring to, the only println in this function is the debug messages.

Unless the incoming data is terminated with a NULL, it doesn't matter.
ALL C style strings MUST be terminated with a NULL (0) byte.
If you have an unterminated string, you can be guaranteed that something like terminal.println(response); will print everything up to and including the last thing you put into response[], and continue along its merry way, cheerfully spitting out garbage until it finds a NULL. Terminate your strings!

Is terminal.println(response); a debug message? It happens to be the response from the GPS, and that's what you are seeing that is crapping out.

I am using hardware serial.

#define terminal Serial

#define nmea_port Serial2
#define command_port Serial3