srinivasf1
Posts: 17
Joined: Thu Jan 29, 2015 4:12 pm

GPS module not showing NMEA messages

Thu Jan 29, 2015 4:23 pm

Hi!


I'm trying to make a GPS tracker. I'm using a Skylab GPS Module MT3328 SKM53 . Data sheet here http://www.skylab.com.cn/ZDXUpLoadFiles ... 261773.pdf

The first time I connected it to Pi using serial port, it worked fine. I was getting all the coordinates properly. Couple of days later, when I connected it again I was getting the NMEA messages but no coordinates. And now it displays PMTK 010. Now, how do I get the GPS module to show the NMEA messages again?

Thanks in Advance!

paulie
Posts: 275
Joined: Thu Jan 19, 2012 6:51 pm

Re: GPS module not showing NMEA messages

Thu Jan 29, 2015 9:38 pm

Here is a page with a link to PMTK commands for a different model of GPS.

http://www.laptopgpsworld.com/3701-diy- ... ys-ls20031

PMTK010 may show starting condition, if I understand correctly. Perhaps your GPS is attempting to cold start, & getting no further.

Check your wiring, & that you are supplying power within tolerances.

I wouldn't immediately try pushing commands to your GPS, in case PMTK is not implemented in a standard manner.

(Before your post I had never heard of PMTK) :?

There will be someone here who knows about it.....
It has been my custom to use Xeyes

P_Monty
Posts: 57
Joined: Sat Dec 27, 2014 2:45 pm
Location: Wiltshire, UK

Re: GPS module not showing NMEA messages

Thu Jan 29, 2015 10:03 pm

If you're getting nmea data, but no coordinates, doesn't that mean the GPs hasn't got a fix yet?

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: GPS module not showing NMEA messages

Fri Jan 30, 2015 12:06 am

srinivasf1 wrote:And now it displays PMTK 010. Now, how do I get the GPS module to show the NMEA messages again?
You should be getting something like

Code: Select all

$PTMK010,001*2E\r\n
or

Code: Select all

$PTMK010,000*2F\r\n
I'd send back a hot start command

Code: Select all

$PTMK101*32\r\n
or warm start command

Code: Select all

$PTMK102*31\r\n
or cold start command

Code: Select all

$PTMK103*30\r\n
depending how long it's been since you got a valid fix and whether your position and ephemeris data are still likely to be valid. Then to get the factory default NMEA data send

Code: Select all

*PTMK314,-1*04\r\n
and it should start sending $GP--- data.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

srinivasf1
Posts: 17
Joined: Thu Jan 29, 2015 4:12 pm

Re: GPS module not showing NMEA messages

Wed Feb 04, 2015 4:03 pm

DougieLawson wrote:
srinivasf1 wrote:And now it displays PMTK 010. Now, how do I get the GPS module to show the NMEA messages again?
You should be getting something like

Code: Select all

$PTMK010[quote][/quote],001*2E\r\n
or

Code: Select all

$PTMK010,000*2F\r\n
I'd send back a hot start command

Code: Select all

$PTMK101*32\r\n
or warm start command

Code: Select all

$PTMK102*31\r\n
or cold start command

Code: Select all

$PTMK103*30\r\n
depending how long it's been since you got a valid fix and whether your position and ephemeris data are still likely to be valid. Then to get the factory default NMEA data send

Code: Select all

*PTMK314,-1*04\r\n
and it should start sending $GP--- data.
Yeah, I am getting something like $PMTK010 . I checked the PMTK manual and I found this . My chip is MT 3329 and it supports this.

Packet Type:314 PMTK_API_SET_NMEA_OUTPUT Support Chip Type:
MT3318、MT3329、MT3339
Packet Meaning: API_Set_NMEA_Out
Set NMEA sentence output frequencies
DataField:
There are totally 19 data fields that present output frequencies for the 19 supported NMEA sentences individually.
Supported NMEA Sentences
0 NMEA_SEN_GLL, // GPGLL interval - Geographic Position - Latitude longitude
1 NMEA_SEN_RMC, // GPRMC interval - Recommended Minimum Specific GNSS Sentence
2 NMEA_SEN_VTG, // GPVTG interval - Course over Ground and Ground Speed
3 NMEA_SEN_GGA, // GPGGA interval - GPS Fix Data
4 NMEA_SEN_GSA, // GPGSA interval - GNSS DOPS and Active Satellites
5 NMEA_SEN_GSV, // GPGSV interval - GNSS Satellites in View
6 //Reserved
7 //Reserved
13 //Reserved 14 //Reserved 15 //Reserved
I'm a bit confused at this, should I send the API as serial data to GPS module or the sentences given below?

paulie
Posts: 275
Joined: Thu Jan 19, 2012 6:51 pm

Re: GPS module not showing NMEA messages

Wed Feb 04, 2015 5:56 pm

Srini,
Did you follow the link in my first reply?
Try the instructions following the terminal setup, to send the data to your GPS over the serial connection.

You will have to connect both serial in, and serial out (and gnd of course!) To the proper gpio pins.
Make sure you have readable data from your GPS first, so you know the baud rate etc. is correct.
It has been my custom to use Xeyes

srinivasf1
Posts: 17
Joined: Thu Jan 29, 2015 4:12 pm

Re: GPS module not showing NMEA messages

Thu Feb 05, 2015 4:22 pm

paulie wrote:Srini,
Did you follow the link in my first reply?
Try the instructions following the terminal setup, to send the data to your GPS over the serial connection.

You will have to connect both serial in, and serial out (and gnd of course!) To the proper gpio pins.
Make sure you have readable data from your GPS first, so you know the baud rate etc. is correct.
Hey Paulie,

Yes, I have gone through your link. The supply levels are alright. The power supply is +5V VCC and the TXD, RXD work at 3.3V, which is the same as the Pi. I have connected the ground too. The baud rate is 9600. The first time I connected it, it worked. I got the right coordinates. I wrote a python script which would display periodically, and they were right.

In subsequent attempts to get data, GPSD wasn't showing a fix and displayed GPS timeout. And the serial data I'm getting has the PMTK010 in it.

Okay, so now if I send "$PMTK314,0,3"
0 corresponds to NMEA_SEN_GLL, // GPGLL interval - Geographic Position - Latitude longitude
3 corresponds to NMEA_SEN_GGA, // GPGGA interval - GPS Fix Data
what could be the next data from GPS?

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: GPS module not showing NMEA messages

Thu Feb 05, 2015 4:34 pm

If you posted 10-15 lines of the NMEA data you receive (incl. the $PTMK lines) maybe it would be easier to speculate.

srinivasf1
Posts: 17
Joined: Thu Jan 29, 2015 4:12 pm

Re: GPS module not showing NMEA messages

Fri Feb 06, 2015 6:17 am

topguy wrote:If you posted 10-15 lines of the NMEA data you receive (incl. the $PTMK lines) maybe it would be easier to speculate.
I'm not getting any NMEA data. When I read from the module, all I get it this
$PMTK011,MTKGPS*08
$PMTK010,001*2E
$PMTK,010, 002*2D
$PMTK011,MTKGPS*08
And this set gets repeated.

srinivasf1
Posts: 17
Joined: Thu Jan 29, 2015 4:12 pm

Re: GPS module not showing NMEA messages

Fri Feb 06, 2015 6:39 am

I sent this command to GPS $PMTK314,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,5,0*2F , According to protocol I have to get the LatLong, ground speed and GNSS satellites in view. But I still get the same messages that I mentioned in my earlier post.

The python script I wrote is this
import serial
import time

port = serial.Serial("/dev/ttyAMA0", baudrate=9600, timeout=10.0)
port.write("PMTK314,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,5,0*2F")

while True:
ch=port.read()
print ch



User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: GPS module not showing NMEA messages

Fri Feb 06, 2015 12:25 pm

I'd send

Code: Select all

$PTMK103*30\r\n
$PTMK314,-1*04\r\n
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

srinivasf1
Posts: 17
Joined: Thu Jan 29, 2015 4:12 pm

Re: GPS module not showing NMEA messages

Mon Feb 23, 2015 4:48 pm

I know I'm very late.

I've tried everything on this page, I still don't get any NMEA data. I only see the PMTK stuff. Any more ideas on what to do?

Return to “Troubleshooting”