7 years, 9 months ago.

MTK3339 GPS (Adafruit Ultimate GPS V3) PMTK commands not responding on LPC1768

Has anyone been able successfully communicate PMTK commands to the MTK3339 GPS (Adafruit Ultimate GPS V3) over serial? I am using the Mbed_Adafruit-GPS-Library which works exceptionally well on RX and data parsing but will not transmit to the device. Most importantly I'd like to tailor the data sent by the chip to the LPC1768.

I've tried a multitude of buffered serial outputs / baud rates but alas nothing seems to work... Breakout has been around for some time so I'm guessing someone must have got it working? I wouldn't ask although I think I have exhausted all English language forum pages on the subject...

Any help greatly appreciated!

Dean

I'm having the same problems - I cannot transmit data to my GPS which works with NMEA0183 protocols. I can read everything from the GPS but like you just want one sentence - not 6.

From the NMEA manual I should be able to control the sentences with: "$<ID requesting Device><ID of GPS device>Q,<approved sence formatter>*check><cr><lf>"

I've tried many combinations but I'm getting nowhere. I probe at the GPS Rx pin and my signal gets there OK. If someone told me there is no connection between the Rx pin on the board and the actual GPS engine I might even believe them!!!!!

I can filter the GPS sentences just the same as every sample program appears to do. But I want only one sentence and nothing annoys me more than circuitry that doesn't do what I want it to do.

Sorry this is not an answer but you are not alone.

John K

posted by John Kneen 14 Mar 2017

Glad to hear it's not just me! Will let you know if I get anywhere - thanks.

posted by Dean Marshall 14 Mar 2017

Got it!

115,200 baud on console out (if in use), 9,600 on gps. Insert a 1 second wait() after gps.baud() then output commands in this format:

include the mbed library with this snippet


        //as required
        //x.printf("$PMTK605*31\r\n");       
        //x.printf("$PMTK104*37\r\n");
        //x.printf("$PMTK220,1000*1F\r\n");
        //x.printf("$PMTK251,9600*17\r\n");
        //x.printf("$PMTK313,1*2E\r\n");
        //x.printf("$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n");
        //x.printf("$PMTK319,1*24\r\n");
        //x.printf("$PMTK413*34\r\n");
        //x.printf("$PMTK513,1*28\r\n");

All now fully tested and working. Hope it works for you too - cheers!

posted by Dean Marshall 15 Mar 2017

1 Answer

5 years, 9 months ago.

I was having similar problems. I ended up posting on the Adafruit forum about it, and have posted my code that solved the problem there: https://forums.adafruit.com/viewtopic.php?f=8&t=147967&p=731490#p731490

The problem was to do with the length of the stock command in the adafruit library being too long, there is a user manual for these commands here: https://www.sparkfun.com/datasheets/GPS/Modules/PMTK_Protocol.pdf