EM85A Command Set

So has anyone figured out the commands to change the refresh rate or serial speed of this GPS yet?

The docs that are linked to are not very accurate, they claim a default of 4800 bps, yet the device is running at 38400. I guess I could hook up the ole logic analyzer and sniff commands from the software they have, but I was curious if someone else had already got the info.

A list of configuration commands is definately needed! Also, the EB-85A User Manual discusses a “Save to Flash” tab in the User Setting window when using GPSTrace v2.61 (aka GPS Locator Utility v2.61), unfortunately that tab doesn’t exist when I installed it. Is there another install password that enables saving a configuration to flash?

Welll, if I keep making progress on things the way I am, I will likely begin to reverse engineer the command set this weekend. I spent last night figuring out the speed of the APB1 bus on my STR711 by timing the serial output because I couldn’t figure it out using ST’s docs, so it wouldn’t be that crazy to do the same for the GPS. Besides, this weekend is when I’ll start needing those commands. When I figure them out I’ll be sure to post them here for others to use as well.

So far my best idea is to to connect the TX pin off of a ftdi 232 to a RX pin on another ftdi 232 and to the GPS so that I can see what the program is sending to the unit. Hopefully they won’t change the bps on the fly or anything crazy so that I should get decent data capture. Worst case, I can also watch it with the logic analyzer of digital oscope, but after last night, decoding serial data from a trace is not high on my list.

Any better ideas?

http://www.microsoft.com/technet/sysint … rtmon.mspx

Here are a couple of manuals for other GPS units with MTK chipset. They seem to correspond to the the handful of commands that GPSViewer put out that I sent (set baud, WAAS enable, set NMEA output freq. - $PMTK314). One difference I noticed was that GPSViewer sent $PMTK220,1000*1F for fix update rate to 1.

<LINK_TEXT text="http://transystem.com.tw/pdf_gps/DataSh … ev1.1.pdf
">http://transystem.com.tw/pdf_gps/DataSheet_EB-2_Rev1.1.pdf
</LINK_TEXT>http://www.transystem.com.tw/driver_man … t-V1.2.pdf

Sweet! What would the command be for 5HZ? $PMTK220,1000*5F?

I tried the Portmon program that oPossum recommended. It works great. It shows everything going between the EB-85A and the PC.

See Below:

0 0.00008549 MiniGPS_1.32.ex IRP_MJ_CREATE Serial0 SUCCESS Options: Open

1 0.00000559 MiniGPS_1.32.ex IOCTL_SERIAL_GET_BAUD_RATE Serial0 SUCCESS

2 0.00000391 MiniGPS_1.32.ex IOCTL_SERIAL_GET_LINE_CONTROL Serial0 SUCCESS

3 0.00000391 MiniGPS_1.32.ex IOCTL_SERIAL_GET_CHARS Serial0 SUCCESS

4 0.00000363 MiniGPS_1.32.ex IOCTL_SERIAL_GET_HANDFLOW Serial0 SUCCESS

5 0.00001648 MiniGPS_1.32.ex IOCTL_SERIAL_SET_BAUD_RATE Serial0 SUCCESS Rate: 38400

6 0.00000894 MiniGPS_1.32.ex IOCTL_SERIAL_SET_RTS Serial0 SUCCESS

7 0.00000922 MiniGPS_1.32.ex IOCTL_SERIAL_SET_DTR Serial0 SUCCESS

8 0.00000698 MiniGPS_1.32.ex IOCTL_SERIAL_SET_LINE_CONTROL Serial0 SUCCESS StopBits: 1 Parity: NONE WordLength: 8

9 0.00000447 MiniGPS_1.32.ex IOCTL_SERIAL_SET_CHAR Serial0 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:0 XOFF:0

10 0.00000670 MiniGPS_1.32.ex IOCTL_SERIAL_SET_HANDFLOW Serial0 SUCCESS Shake:1 Replace:40 XonLimit:0 XoffLimit:0

11 0.00000363 MiniGPS_1.32.ex IOCTL_SERIAL_SET_QUEUE_SIZE Serial0 SUCCESS InSize: 4096 OutSize: 128

12 0.00000391 MiniGPS_1.32.ex IOCTL_SERIAL_SET_TIMEOUTS Serial0 SUCCESS RI:0 RM:0 RC:100 WM:0 WC:500

13 0.00000838 MiniGPS_1.32.ex IOCTL_SERIAL_PURGE Serial0 SUCCESS Purge: RXCLEAR

14 0.00007347 MiniGPS_1.32.ex IRP_MJ_WRITE Serial0 SUCCESS Length 14: $PMTK605*31…

15 0.10934043 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 29: $PMTK705,Mcore_1.51,0131*21…

16 0.03041839 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: $GPGGA,000642.805,8960.000000,N,00000.000000,E,0,0,137.000,M,13

17 0.00978393 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: ,1E…$GPGSV,1,1,0079…$GPRMC,000642.805,V,8960.000000,N,00000

18 0.10936250 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 39: $GPVTG,0.00,T,M,0.000,N,0.000,K,N*32…

19 0.04192125 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: $GPGGA,000643.004,8960.000000,N,00000.000000,E,0,0,137.000,M,13

20 0.10929937 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 91: 0.000000,N,00000.000000,E,0.000,0.00,060180,N*4B…$GPVTG,0.00,

21 0.06999996 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: $GPGGA,000643.204,8960.000000,N,00000.000000,E,0,0,137.000,M,13

22 0.10925383 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 91: 0.000000,N,00000.000000,E,0.000,0.00,060180,N*49…$GPVTG,0.00,

23 0.06681827 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: $GPGGA,000643.404,8960.000000,N,00000.000000,E,0,0,137.000,M,13

24 0.10940022 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 91: 0.000000,N,00000.000000,E,0.000,0.00,060180,N*4F…$GPVTG,0.00,

25 0.06367038 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: $GPGGA,000643.605,8960.000000,N,00000.000000,E,0,0,137.000,M,13

26 0.10934714 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 91: 0.000000,N,00000.000000,E,0.000,0.00,060180,N*4C…$GPVTG,0.00,

27 0.06156593 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: $GPGGA,000643.805,8960.000000,N,00000.000000,E,0,0,137.000,M,13

28 0.00964815 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: ,1E…$GPGSV,1,1,0079…$GPRMC,000643.805,V,8960.000000,N,00000

29 0.10933485 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 39: $GPVTG,0.00,T,M,0.000,N,0.000,K,N*32…

30 0.04182906 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: $GPGGA,000644.004,8960.000000,N,00000.000000,E,0,0,137.000,M,13

31 0.10913091 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 91: 0.000000,N,00000.000000,E,0.000,0.00,060180,N*4C…$GPVTG,0.00,

32 0.07012344 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: $GPGGA,000644.204,8960.000000,N,00000.000000,E,0,0,137.000,M,13

33 0.10932870 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 91: 0.000000,N,00000.000000,E,0.000,0.00,060180,N*4E…$GPVTG,0.00,

34 0.06675346 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: $GPGGA,000644.404,8960.000000,N,00000.000000,E,0,0,137.000,M,13

35 0.10936865 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 91: 0.000000,N,00000.000000,E,0.000,0.00,060180,N*48…$GPVTG,0.00,

36 0.06360948 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: $GPGGA,000644.605,8960.000000,N,00000.000000,E,0,0,137.000,M,13

37 0.10938150 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 91: 0.000000,N,00000.000000,E,0.000,0.00,060180,N*4B…$GPVTG,0.00,

38 0.06154553 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: $GPGGA,000644.805,8960.000000,N,00000.000000,E,0,0,137.000,M,13

39 0.00965570 MiniGPS_1.32.ex IRP_MJ_READ Serial0 SUCCESS Length 100: ,1E…$GPGSV,1,1,0079…$GPRMC,000644.805,V,8960.000000,N,00000

40 0.10936669 MiniGPS_1.32.ex IRP_MJ_READ Serial0 TIMEOUT Length 39: $GPVTG,0.00,T,M,0.000,N,0.000,K,N*32…

docphi:
Sweet! What would the command be for 5HZ? $PMTK220,1000*5F?

Here is the info on setting the reporting rate of the engine:

Packet Type: 314 PMTK_API_SET_NMEA_OUTPUT

Packet Meaning:

API_Set_NMEA_Out

Set NMEA sentence output frequencies.

DataField:

There are totally 17 data fields that present output frequencies for the 17 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 NMEA_SEN_GRS, // GPGRS interval - GNSS Range Residuals

7 NMEA_SEN_GST, // GPGST interval - GNSS Pseudorange Errors Statistics

13 NMEA_SEN_MALM, // PMTKALM interval - GPS almanac information

14 NMEA_SEN_MEPH, // PMTKEPH interval - GPS ephmeris information

15 NMEA_SEN_MDGP, // PMTKDGP interval - GPS differential correction information

16 NMEA_SEN_MDBG, // PMTKDBG interval – MTK debug information

Supported Frequency Setting

0 - Disabled or not supported sentence

1 - Output once every one position fix

2 - Output once every two position fixes

3 - Output once every three position fixes

4 - Output once every four position fixes

5 - Output once every five position fixes

Example:

$PMTK314,1,1,1,1,1,5,1,1,1,1,1,1,0,1,1,1,1*2C

This command set GLL output frequency to be outputting once every 1 position fix, and RMC to be outputting once every 1 position fix, and so on.

You can also restore the system default setting via issue:

$PMTK314,-1*04

What would be the command to change the update rate from 1Hz to 5Hz?

docphi:
Sweet! What would the command be for 5HZ? $PMTK220,1000*5F?

The $ is the Preamble (start of data)

The * is the terminator (end of data)

The Hex word after the terminator * is the 8bit XOR which is used as a checksum.

GOOGLE or wikipedia any of the concepts you do not understand or respond ill watch this topic. I am in the process of learning GPS also.

hmmm how can I set the Baundrate of the module to 4800?

This does not work:

serial.println(“$PMTK251,4800*27”);

Thx

Geko

Did you include a Carriage return, Line Feed?

Hmm do I have to? There is already the println is this not enough? There is already a return included.

By the way. Can you store the settings in the Flash so after it gets repowered it remembers the last settings?

Geko

Your checksum (two digit hex number after the ) is wrong. The correct string would be: $PMTK251,480014

You can calculate the checksum by XORing all bytes between the $ and the *, or just google NMEA checksum calculator.

Thx I already got the mistake.

Geko