Audi MMI Waypoints

Similar work

Mike Caddy wrote to me to tell me about a similar project.1 I’ve not looked at the code, but it might be useful.

Introduction

As a keen, but somewhat optimistic, geocacher, I am keen to upload thousands of waypoints to my car’s satnav in the hope that this will make it easier to find caches.

In the past, I used a TomTom GPSr which understood the .ov2 format, but my new car, a 2014 Audi A3, has an inbuilt navigation system. In principle you can upload waypoints to this too: the myAudi website allows you upload GPX, KML, &c. files, then download them as ‘Special destinations’ to a SD-card. You then ask the car to read the SD card.

The reality

However in reality using this is a pain. In principle Audi could teach the car about GPX files avoiding the cloud entirely, or allow you to upload and download multiple types of data at once. In reality, you must:

upload a separate file for each type of waypoint;

download a file which turns out to be a small Java program;

run that ignoring all the warnings about unsigned binaries;

let this program download yet more data;

save the data using the awful Java file-chooser.

Having banished Java from my Mac, it was galling to have to reinstall it for this, particularly given all the nonsense Oracle try to foist on you when installing software.

Standing back

Although the implementation seems foolish to me, in essence the task is simple: given some coordinates convert them into a set of files compatible with the Audi’s MMI.

If you look at the files from myAudi, you’ll see that it’s all fairly straightforward. After a bit of digging, it was obvious that:

Astute observers will note the lack of a poiid column in the poiname table, which breaks normal form! There appears to be an implicit assumption that the first row inserted into poiname corresponds to poiid == 1, and so on.

SHA-1

Most of the files are small, and their checksums are computed using normal SHA-1.4 Larger files are first cut into 512kB chunks, and each chunk processed individually. The chunk size is specified in the files, so perhaps you could change it: I have not explored this.

In one case a file contains its own checksum: what this really means is that the file contains the checksum of the file with that line removed.

File sizes

Reference is also made to the size of files. When referring to the size of the hashes.txt file (which stores information about other files) the number in question is actually the total size of the files to which reference is made in hashes.txt.

Icons

Each class of waypoints is associated with an icon. I used 33×33 pixel icons in my tests, and those numbers are implitly embedded into magic constants in the code.

Metadata

I suspect you can have fun messing around with the metadata to promote your waypoints higher up the waypoint hierarchy, and tweaking their display on the map. I have not explored this.

File names and version numbers

I made guesses about the formats these should have, and hoped that here not be magick. Thus far it seems to be OK.

Proof of concept

I wrote a quick proof-of-concept library in Perl. It takes the form of a single file, which you can grab from GitHub.5

The file is quite large, in part because it contains uncompressed versions of some icons which appear to be included in every download.

It is not production quality code, it might not work, and it might break your car. Use it at your own risk.