# No or wrong NMEA checksum for GPS data from MT3339

I have LS20031 GPS module (I believe with MT3339 chip) connected to Arduino. Using SoftwareSerial reading data when available(). 57600 is the baudrate for GPS. However, I rarely get checksum at all. Here is sample output.

$GPGGA,211152.400,4011.3996,N,04431.9971,E,1,3,5.75,135.5,M,14.37,,$GPGGA,211152.600,4011.3996,N,04431.9970,E,1,3,5.75,135.5,M,14.$67 2$GPGGA,211152.800,4011.3996,N,04431.9969,E,1,3,5.75,135.5,M,14.9802$GPGGA,211153.000,4011.3996,N,04431.9968,E,1,3,5.75,135.5,M,14.9000N$GPGGA,211153.200,4011.3997,N,04431.9967,E,1,3,5.75,135.5,M,14.,70M$GPGGA,211153.400,4011.3997,N,04431.9965,E,1,3,5.75,135.5,M,14.41,$GPGGA,211153.600,4011.3997,N,04431.9964,E,1,3,5.75,135.5,M,14.9602N$GPGGA,211153.800,4011.3998,N,04431.9963,E,1,3,5.75,135.5,M,14.950$,$GPGGA,211154.000,4011.3999,N,04431.9962,E,1,3,5.75,135.5,M,14.40.K$GPGGA,211154.200,4011.3999,N,04431.9961,E,1,3,5.75,135.5,M,14.L7,8$GPGGA,211154.400,4011.4000,N,04431.9959,E,1,3,5.75,135.5,M,14.4.8,$GPGGA,211154.600,4011.4000,N,04431.9958,E,1,3,5.75,135.5,M,14.960M,$GPGGA,211154.800,4011.4001,N,04431.9957,E,1,3,5.75,135.5,M,14.,,,3$GPGGA,211155.000,4011.4001,N,04431.9956,E,1,3,5.75,135.5,M,14.4784$GPGGA,211155.200,4011.4002,N,04431.9955,E,1,3,5.75,135.5,M,14.4.,$GPGGA,211155.400,4011.4002,N,04431.9955,E,1,3,5.75,135.5,M,14.4,$9$GPGGA,211155.600,4011.4002,N,04431.9954,E,1,3,5.75,135.5,M,14.4,7.$GPGGA,211155.800,4011.4003,N,04431.9953,E,1,3,5.75,135.5,M,14.1$P2$GPGGA,211156.000,4011.4003,N,04431.9953,E,1,3,5.75,135.5,M,14.,007,.$GPGGA,211156.078,4011.4003,N,04431.9953,E,1,3,5.75,135.5,M,14.2.,GAG$GPGGA,211156.400,4011.4004,N,04431.9953,E,1,3,5.75,135.5,M,14.,7,2$GPGGA,211156.600,4011.4005,N,04431.9952,E,1,3,5.75,135.5,M,14.962.K$GPGGA,211156.800,4011.4005,N,04431.9952,E,1,3,5.75,135.5,M,14.9*0N4$GPGGA,211157.000,4011.4005,N,04431.9952,E,1,3,5.75,135.5,M,14.9G22$GPGGA,211157.200,4011.4005,N,04431.9953,E,1,3,5.75,135.5,M,14.P* 2$GPGGA,211157.400,4011.4005,N,04431.9953,E,1,3,5.75,135.5,M,14.G7,.$GPGGA,211157.600,4011.4006,N,04431.9953,E,1,3,5.75,135.5,M,14.9S,N$GPGGA,211157.800,4011.4006,N,04431.9952,E,1,3,5.75,135.5,M,14.,.N$GPGGA,211158.000,4011.4006,N,04431.9952,E,1,3,5.75,135.6,M,14.,7,2$GPGGA,211158.200,4011.4006,N,04431.9952,E,1,3,5.75,135.6,M,14.,.


GPS module is blinking red which means it has enough satellites. Also I can see 3 satellites are found in the messages and fix. This module is brand new and less likely it can be buggy.

I also tried TinyGPS library, particularly examples. There is a strange thing. If I just run the program, it will give me no data and checksum errors slowly increasing.

If I leave the program for a while, it will occasionally produce data (sentence).

I have tried to change RX pin as well as Arduino itself, to exclude error there.

Update:

Here is some data, when I take the module inside of house, so it will be out of satellite coverage:

How to find the where is the problem? What additional information I can provide?

• Can you explain the fact that successive messages seem to be run together without line breaks? It appears you may be losing the end of each line. – gbarry Nov 1 '12 at 22:47
• @gbarry, not really. But I can give more information in that way. Please check my update. It looks like when the data stream is less intensive, less data is lost. Is there buffer size for serial data which can be configured? – Pablo Nov 1 '12 at 22:58
• I tried to configure GPS baudrate to 9600 and no errors at all! Now I am more sure this has something to do with serial buffers... – Pablo Nov 1 '12 at 23:27
• There's not buffering, but as you're using a software UART you might be missing bits. Bad wiring might also lead to missing bits. – Trygve Laugstøl Nov 2 '12 at 7:30