More details

From PyGarmin

Jump to: navigation, search

There are 3 levels of protocol documented:

Application (highest level)
Link layer -
Physical layer (lowest level)

The specification documents the various different versions of these under labels of Pxxx, Lxxx, Axxx etc, where xxx is a number, and this convention is followed here. There are also various data types, named Dxxx. Roughly speaking, the Physical protocols specify RS232, the Link protocols specify a packet structure for sending messages to and fro, and the Application protocols specify what can actually go in those packets.

For example, a Garmin GPS 38 will talk to your computer over physical layer P000 (RS232) using a packet structure defined by link layer L001. If you want to transfer waypoints to and from it, they will be sent using application layer A100 (a waypoint transfer protocol), and the actual waypoints transferred will be of type D100.

At the time of writing, the only documented physical layer is P000 which is roughly RS232 at 9600 baud, 8 data bits, no parity, 1 stop bit. In the software, we model this as a P000 class that has read and write methods, which can be used by the higher protocol levels. The UnixSerialPort class used in the sample code above is a subtype of P000.

I hope that's enough to get you going.

Some data type classes are not implemented here, just because I got bored of typing. We've done the ones used by the more common units, but if yours isn't covered, it should be easy to add. They're only a few lines each.

Back to the Main Page...

Personal tools