Beyond 'Garmin Device Interface Specifications'

Discussion related to the Garmin GPSMAP 64 series GPSr
gavineadie
Posts: 7
Joined: Mon May 13, 2024 5:53 am

Beyond 'Garmin Device Interface Specifications'

Unread post by gavineadie »

My first post here. I'm writing (macOS) software to interrogate a GPSMAP 64s and while the Garmin document "Garmin Device Interface Specification" (April 14, 2020) covers much of the interface, it doesn't cover all the capabilities of the device (or, for that matter, many other Garmin GPSs). The document FAQ, refreshingly honest, says for many questions, "We currently don’t have the resources to provide this information."

Currently, I'm wrestling with reverse engineering the data to create a screenshot; I'm close but some of the data seems contradictory. But my question is more general, namely to ask if other documentation (from Garmin, or others) exists to fill the gaps.

The Interface Specification has been revised a few times (the 2020 version is revision "G") -- is there a revision "H" out there?
There's other open source third-party software I've looked at but they generally don't expand abilities past Rev "G".

For those following me so far, an example: There's an application protocol, "A800" which covers real-time position, velocity, and time information sent out from the device once a second -- that's a protocol which is well covered in the documentation (as are "A100", "A200", etc), but "A900" (which the 64s implements, along with other "A9xx" protocols) is not mentioned. What do they do?

Many questions -- I hope appropriate for this forum. Presumably answers wouldn't reveal proprietary Garmin intellectual property, but if I'm stepping over any lines, let me know and I'll desist. Thanks.
User avatar
GPSrChive
Site Admin
Posts: 3941
Joined: Fri Jan 20, 2017 11:29 pm

Re: Beyond 'Garmin Device Interface Specifications'

Unread post by GPSrChive »

Have you explored this information resource yet?
gavineadie
Posts: 7
Joined: Mon May 13, 2024 5:53 am

Re: Beyond 'Garmin Device Interface Specifications'

Unread post by gavineadie »

I hadn't, thanks .. there's a lot of information there but it relates to file formats and I'm looking for the format of exchanges on the (USB) wire between the CPS and the computer. The file format info is interesting, though I notice nothing about the *BMP image format that GPSMAP60, etc uses for screenshots -- mind you, that format is well defined in multiple places!
User avatar
javawa
Posts: 34
Joined: Sun Apr 02, 2023 12:07 am

Re: Beyond 'Garmin Device Interface Specifications'

Unread post by javawa »

Years ago Garmin made a computer program named xImage that could be used to retrieve screenshots from Garmin devices. Those devices used the Garmin serial protocol to communicate with PC's. 18 years ago they started to use a different way to communicate with devices using USB Mass Storage Mode (and recently Media Transfer Protocol). The first outdoor devices with the new communication method were the Oregon and Colorado models. xImage doesn't work with those devices. Instead, there is an option in the device menu to create a screenshot. While modern devices still support the serial protocol (in Spanner mode), I guess support of the protocol is limited to certain functions. It looks like image transfer is not part of it.
My Garmin GPS collection: https://www.javawa.nl/collectie.html
gavineadie
Posts: 7
Joined: Mon May 13, 2024 5:53 am

Re: Beyond 'Garmin Device Interface Specifications'

Unread post by gavineadie »

I've heard of xImage and that started me on the path of writing a similar program for macOS many (10+) years ago. I was using a GPSMAP60CSx and I was able to successfully command the GPS to send a screen image (and other data) to the Mac. I recently started to rewrite that app for my GPSMAP64s, communicating in Spanner mode over USB -- the new app does all the documented kinds of transfers (tracks, almanac, date+time, position, PVT), plus a few other actions. [Curiously, the 64s "capabilities" doesn't include "A100" (Waypoint Transfer) or "A200" (Route Transfer), which seems odd because the old 60CSx did.]

I'm stuck, or slowed down, by two barriers.
  • Screen transfer: The 64s screen has a greater color depth than the 60CSx and since no Screen Transfer protocol is defined, and my old 60CSx code doesn't do it, I'm attempting to convert the data stream coming from the GPS into an image -- so far, this reverse engineering has allowed the creation of a corrupt version of the screen (recognizable, but incomplete -- work continues optimistically).

    Another approach would be for my app to command the 64s to do a screengrab and then send it over the wire -- sadly, neither of those actions (if they are possible) is documented. Taking a manual screenshot, I can see that it's a *.BMP image.
  • Other actions: The 64s "capabilities" include several more protocols, "A900" and upward, but these are not documented. As mentioned above, transferring waypoints and route, though documented, are not available on a 64s. Curiosity is my only driver for figuring those out and not implementing them wouldn't break my heart!
I appreciate the suggestions and comments I've received. If/when I make progress I'll report back here.

PS: The authors of gpsbabel seem to have not advanced GPSMAP6.. support beyond the 60CSx .. maybe they hit the same roadblock?
User avatar
javawa
Posts: 34
Joined: Sun Apr 02, 2023 12:07 am

Re: Beyond 'Garmin Device Interface Specifications'

Unread post by javawa »

I can't help you further with your search...
Maybe you can help me with another problem? I own several Garmin devices, and some of them are not weeknumber rollover proof. Those with a serial interface can be fixed using a very old Garmin program (GpsEow). That program sets the internal date a year forward (and maybe clears the almanac, but I'm not sure of that), and after getting a fix the device shows the correct date. To be exact: GpsEow sets the date to the first date of the same month a year forward (so 2024-05-14 would be 2025-05-01). I guess the right protocol is "A600".
Some of my devices with a rollover problem have USB interfaces, I can't fix them with that program. Garmin issued updates for many models, but not for all of them. I've searched for a solution, but didn't found any...
My Garmin GPS collection: https://www.javawa.nl/collectie.html
gavineadie
Posts: 7
Joined: Mon May 13, 2024 5:53 am

Re: Beyond 'Garmin Device Interface Specifications'

Unread post by gavineadie »

I'm happy to take a look .. I've not transferred any data TO my GPSr yet, but my program has the framework to do that. If you're OK with a macOS program, and I can reset the date as you suggest, I could send you a little command line program to do it. I suggest command line because it's a bit easier to print diagnostics when run from Terminal (but I could send a little regular app, if you want).
gavineadie
Posts: 7
Joined: Mon May 13, 2024 5:53 am

Re: Beyond 'Garmin Device Interface Specifications'

Unread post by gavineadie »

I wrote a little macOS Terminal command to change the date+time in the way you suggested, and it seems to work on my 64s (and doesn't convert it to a brick!). It needs macOS 10.12 (Sierra) or higher and I've got only a 64s, so other Garmin devices may need me to make adjustments to recognize them.

<-- : current time read
--> : new time sent
<-- : time read again to confirm the change

Code: Select all

gavin@MaxBook A600 % ./Debug/A600 
          
A600 : Set Date + Time of Garmin USB GPSr
<-- 2024-05-15 04:47:32
--> 2025-05-01 00:00:00
<-- 2025-05-01 00:00:00
Since I don't know long the changed time persists, I think the program should command the GPS to power off to ensure a correct time when it is used next. What do you think? I'll also build an Intel/ARM combination and sign it with my developer signature so you don't have to fuss with quarantine and permissions. It's also not sandboxed to avoid it asking permission to touch your Mac's USB ports. I should send this to you privately, so could you send your mail address to me at the temporary address
Spoiler
This was fun .. thanks for the challenge!
Vadim
Posts: 1
Joined: Wed May 15, 2024 12:06 pm

Re: Beyond 'Garmin Device Interface Specifications'

Unread post by Vadim »

Hello!

I'm impressed with the work you've done!

Could you tell me the "Screenshot transfer protocol" number ?
Is this protocol stated in the protocol list of the new device (64s)?
Does the xImage utility version 2.3 work with 64s ?
gavineadie wrote: Tue May 14, 2024 2:52 am
  • Screen transfer: The 64s screen has a greater color depth than the 60CSx and since no Screen Transfer protocol is defined, and my old 60CSx code doesn't do it, I'm attempting to convert the data stream coming from the GPS into an image -- so far, this reverse engineering has allowed the creation of a corrupt version of the screen (recognizable, but incomplete -- work continues optimistically).
As far as I remember, the old device (60CSx) sent the palette (256 colors x 4 bytes per color) first and then the bitmap of the image (pixel count x 1 byte per pixel). Does the new device work the same way ?

And what’s wrong with the picture you’re trying to get from a new device (64s)? Could you show the resulting "corrupted" picture?

PS: Sorry for so many questions... :)
PPS: I tried to get a screenshot from new gen Garmin Etrex 32x using the xImage v2.3. The program did not find any suitable device. :(
User avatar
javawa
Posts: 34
Joined: Sun Apr 02, 2023 12:07 am

Re: Beyond 'Garmin Device Interface Specifications'

Unread post by javawa »

xImage doesn't work on your device, use the built in screenshot function instead.
menu Setup > Display > Screen Capture
My Garmin GPS collection: https://www.javawa.nl/collectie.html
Post Reply

Return to “GPSMAP 64”