Note: This html document was converted from a document created and put into the public domain by John F. Waers (jfwaers@csn.net.)
This document was converted by Tim Hogard
(thogard@abnormal.com.)
Back to Tim's Homepage
Note that new material has been added at the end of this document.
Garmin Protocol
Garmin Protocol
GRMN/GRMN Simplified Communication Protocol Communication Setup
- Baud rate: 9600 bps
- Data bits: 8
- Stop bits: 1
- Parity: None
Message Format
All messages start with a hexadecimal 10 start-of-message character, and are terminated by a checksum byte followed by hexadecimal 10 and 03 characters. If a data field within a message (including the checksum) contains a hexadecimal 10, it is repeated. The checksum is the 2's-complement of the modulo-256 sum of all of the message bytes after the start-of-message character. The Garmin PCX5 program always starts communication with a request for the model/software version. This appears to be unnecessary if just communicating with a GPS 45. However, there are probably differences in protocol between the various models of GPS receivers, and the protocol described in this document probably does not apply to all models.
The first message byte always indicates the type of message to follow.
- 06 - Send single record
- 0A - Prepare to send GPS database (almanac, waypoint, route, track, etc.)
- 1B - Number of database records to send
- 1D - Route ID/Name record
- 1E - Route Waypoint Record
- 1F - Almanac Record
- 22 - Track record
- 23 - Waypoint Record
The second message byte always indicates the number of bytes in the message to follow, excluding the checksum and message terminator bytes. The remaining message bytes contain the message itself, which is dependent upon the type of message being sent.
Commands
- 10 0A 02 01 00 F3 10 03 Send Almanac
- 10 0A 02 04 00 F0 10 03 Send Routes
- 10 0A 02 06 00 EE 10 03 Send Track
- 10 0A 02 07 00 ED 10 03 Send Waypoints
- 10 06 02 22 00 D6 10 03 Send next record (seems to work with all types)
- 10 06 02 xx 00 yy 10 04 Send next record commands (yy -- is the message checksum):
- 1B Send first record
- 0C Send last record
- 22 Send next track record
- 1F Send next almanac record
- 1D Send next route waypoint record
- 1E Send next route ID record
- 23 Send next waypoint record
There is probably a command for repeating the last record, in the event of a checksum error. The GPS 45 will automatically retransmit the last record if a send next record command is not received within a 5 second time-out period.
"OK" Message
(or "let's get on with it" command) (GPS 45 seems to respond to all of the 0A02xx commands with this message):
- 10 06 02 0A 00 EE 10 03
- 10 Start of message
- 06 Record
- 02 Number of message bytes to follow
- 0A "OK" response
- 00 Future expansion?
- EE Checksum
- 1003 Message terminator
Number of Records Message
10 1B 02 05 00 DE 10 03
- 10 Start of message
- 1B Number of records message ID
- 02 Number of message bytes to follow
- 0500 0x0005 records to follow (LSB first)
- DE Checksum
- 1003 Message terminator
Track Record Format
10 22 0D CB 17 92 1C E6 08 45 B5 B5 5B BB 08 01 85 10 03
- 10 Start of message
- 22 Track record ID
- 0D Number of message bytes to follow
- CB17921C Latitude (40.1775)
- E60845B5 Longitude (-105.08953)
- B55BBB08 Time (seconds since 12/31/89 00:00:00), UTC
- 01 Last record in track flag [This is 1 on the first record of a teack, 0 on all others]
- 85 Checksum
- 1003 Message terminator
Route ID/Name Record Format
10 1D 15 03 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 5F 00 20 20 20 7B 10 03
- 10 Start of message
- 1D Route record ID
- 15 Number of message bytes to follow
- 03 Route #3
- 5F... Route name (all underscores indicates default name in this case, 16 letters + null termination) 202020 3 spaces for something (probably max name length of 20 characters)
- 7B Checksum
- 1003 Message terminator
Route Waypoint Record
10 1E 3A 48 4F 4D 45 20 20 00 22 92 1C 3F FA 44 B5 A6 19 9B 08 31 32 33 20 53 4E 4F 57 4D 41 53 53 20 50 4C 00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 EE 10 03
- 10 Start of message
- 1E Route waypoint record ID
- 3A Number of message bytes to follow
- 484F... Waypoint ID, 6 letters
- 0022921C Latitude (40.17773)
- 3FFA44B5 Longitude (-105.08985)
- A6199B08 Time waypoint stored (144,382,374 seconds since 12/31/89 00:00:00), UTC
- 313233.. Waypoint comment, 40 letters, null terminated
- EE Checksum
- 1003 Message terminator
Waypoint Record
10 23 3A 48 4F 4D 45 20 20 00 22 92 1C 3F FA 44 B5 A6 19 9B 08 31 32 33 20 53 4E 4F 57 4D 41 53 53 20 50 4C 00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 E9 10 03
- 10 Start of message
- 23 Waypoint record ID
- 3A Number of message bytes to follow
- 484F... Waypoint ID, 6 letters
- 0022921C Latitude (40.17773)
- 3FFA44B5 Longitude (-105.8985)
- A6199B08 Time waypoint stored (144,382,374 seconds since 12/31/89 00:00:00), UTC
- 313233.. Waypoint comment, 40 letters
- E9 Checksum
- 1003 Message terminator
Almanac Record
10 1F 2A FB 02 00 00 48 48 00 00 28 B8 00 00 80 AC 00 A8 6A 3B B1 0D A1 45 1A 99 1F BE 42 D5 9B BF D9 4A 14 C0 EB 48 07 B2 82 73 74 3F A1 10 03
- 10 Start of message
- 1F Almanac record ID
- 2A Number of message bytes to follow
- FB02 GPS Week (763) (FFFF indicates inactive satellite)
- 0000 Health?
- 4848 Somehow related to time of applicability
- 00 Unknown ... (no interpretation yet)
- A1 Checksum
- 1003 Message terminator EOF Records
These messages are sent at the completion of a database transmission, when no more records remain to be sent.
- 10 0C 02 06 22 CA 10 03 Track EOF
- 10 0C 02 07 00 EB 10 03 Waypoint EOF
- 10 0C 02 04 00 EE 10 03 Route EOF
- 10 0C 02 01 00 F1 10 03 Almanac EOF
Upload from GPS 45 Protocol
Send appropriate upload database command (almanac, route, track, waypoint) GPS 45 will respond with two messages: "OK" message Number of records message Send the next record command repeatedly until EOF record is observed. For each command, the GPS 45 will send the next record. There appears to be no need to differentiate between the types of next record command--any of them seem to work.
Download to GPS 45 Protocol
Send number of records message GPS 45 will respond with a send first record command of the format: 10 06 02 1B 00 DD 10 03 Send the appropriate record. For each one, the GPS 45 will respond with a send next record command for the appropriate record type. Just look for the 0602 in the message and keep on sending until the GPS 45 responds with the appropriate EOF record (0C in the second byte).
Format of longitude, latitude and time fields
All are 32 bit signed integers in "little-endian" format; i.e. least significant byte is transmitted first. To convert the decimal latitude and longitude to degrees, multiply by 180 / 2^31. The latitude and longitude are referenced to the WGS84 datum. The time field is the number of seconds since 00:00 UTC, January 1, 1990.
Summary of Message Formats
- 10 0A 02 01 00 F3 10 03 Send Almanac Database Command
- 10 0A 02 04 00 F0 10 03 Send Routes Database Command
- 10 0A 02 06 00 EE 10 03 Send Track Database Command
- 10 0A 02 07 00 ED 10 03 Send Waypoints Database Command
- 10 06 02 22 00 D6 10 03 Send next record (seems to work with all types)
- 10 06 02 xx 00 yy 10 04 Send next record commands (yy -- is the message checksum):
- 1B Send first record
- 0C Send last record
- 22 Send next track record
- 1F Send next almanac record
- 1D Send next route waypoint record
- 1E Send next route ID record
- 23 Send next waypoint record
- 10 06 02 0A 00 EE 10 03 OK, lets get on with it message
- 10 1B 02 05 00 DE 10 03 Number of records = 0005 10 22 0D... Track record (15 bytes)
- 10 1D 15... Route ID/Name (21 bytes)
- 10 1E 3A... Route Waypoint Record (58 bytes)
- 10 23 3A... Waypoint record (58 bytes)
- 10 1F 2A... Almanac record (42 bytes)
- 10 0C 02 01 00 F1 10 03 Almanac EOF Record
- 10 0C 02 04 00 EE 10 03 Route EOF Record
- 10 0C 02 06 00 EC 10 03 Track EOF Record
- 10 0C 02 07 00 EB 10 03 Waypoint EOF Record
New stuff starts here....
This was added by thogard@abnormal.com
This is a list of known codes. The number in the form of 0300 are Intel notaion for the number 3. I expect the gerneral format for the the codes is [Start] [MsgType] {[SubMsg] {[Parameters]}}{ [Checksum]}. This would imply that the 10 03 s not an end of message indicator but a trun arround command instead.
These don't have the data or parity added (See above for examples)
- 10 0a 02 01 00 Hardware Version
- 10 0a 02 02 00 Position
- 10 0a 02 03 00 Proximity
- 10 0a 02 04 00 Routes
- 10 0a 02 05 00 Time
- 10 0a 02 06 00 Track
- 10 0a 02 07 00 Waypoints
- 10 0a 02 08 00 Power Off
10 1c 02 xx xx Send data (xx) in Async mode. When used with 00, it turns off async mode.
Hardware
The Garmin GPS40, GPS45 and GPS90 are all based on the same hardware. It consists of Garmins multiplexing GPS reciever as well as an 80188 based system. The 80188 controls the display and keypad as well as the coordinate conversion to the different formats and map datums. The program is stored in what could be Flash RAM so it might be possable to make modifications to the program area using the Garmin protocol.