is there any way I can run an MG2639 GPS Cellular Shield (the one SparkFun makes) on an Arduino Uno for GPS tracking purposes? It seems whether I use New or AltSoftSerial, the unit just can’t read what’s streaming in through from the GPS on the 115200 baud rate, which the shield is hard-wired to.

  • Have you tried sending the baud rate command yet?
    – slash-dev
    Dec 16, 2015 at 22:46

1 Answer 1


Try sending a command that sets the GPS baud rate to something a little lower:

altss.write( F("$PMTK251,38400*27\r\n") );
altss.begin( 38400 ); // change to match above command

Are you sure you're having trouble reading, because there are many other things you may be doing in your sketch that cause input buffer overflow. Please post your code and some sample output for us to examine. It may be failing for a different reason.

For example, you may just be losing data because you're trying to do too many things in loop(). Please take a look here.

To solve this kind of problem, I have posted a modified version of AltSoftSerial on github, here, that let you process GPS data in the background (i.e., during interrupts). When coupled with NeoGPS, it can save you quite a bit of program space, RAM and execution time. There is an interrupt-driven example here. Just change which include is uncommented on lines 30-31:

  // Only one serial port is available, uncomment one of the following:
  #include <NeoICSerial.h>
  //#include <NeoSWSerial.h>
#include "GPSport.h"

...and the baud rate below, on line 140:

  // Start the UART for the GPS device
  gps_port.attachInterrupt( GPSisr );
  gps_port.begin( 115200 );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.