GPS Logger Tomfoolery: Getting the GlobalSat DG-100 Working On a Mac (Successfully!)
One of my intentions this year is to track more of my movements and document them in photographic form. One of the downsides of the GlobalSat DG-100 GPS logger is that there is no support, at least not officially, for Mac users to retrieve tracking information, necessitating a trip to Windows and then back to get the photos matched up with the coordinates at which they were taken. Many have tried, and failed, to hack it in, and after spending a couple of hours today, I can now declare myself as part of those who have failed. But I came oh so close.
Spurred by Richard Akerman's writeup and screenshots of HoudahGeo for the Mac, and especially his sidebar comment about support for the GPS logger we both own, mixing metaphors like few have mixed before me, I dove into the swamp of programs and yak shaved until the cows came home. Or, rather, until an error message that I couldn't debug appeared on my Terminal screen. Cough. Here are the steps I took to get where I got to before giving up.
First, I downloaded the GPSBabel command line program and graphical interface, but not before spending a few minutes looking at the gpsbabel.org documentation. It's not clear from their downloads page, but you have to click through another link to get through to the SourceForge project page. SourceForge, despite improvements in their interface, is still not easy enough to use, and not easy enough to get a direct download link for a package (which I often need when at the command line using wget). That's another story. After downloading the Mac OS X package, and hopelessly futzing around with the command line supplied for the DG-100, I searched around a bit and found someone who had also tried GPSBabel with the DG-100 and found out that indeed DG-100 support wasn't built into the 1.3.4 release. They suggested checking out the HEAD version from the SourceForge CVS repository. If none of that previous sentence made any sense to you, consider yourself part of the blissful majority.
That of course meant compiling software. And what do you need when you compile software? A compiler! The compiler I needed was gcc, and seemingly the only way to get gcc is to install it from the DVD that comes with your Mac. People like me lose stuff like that. Not yet, in my case, as my DVDs are in a cabinet at my apartment, but having done most of the work at the office, they needed to be at the office. Good thing I work with Mac users.
After a couple of tries at installing gcc (I needed the SDK for Mac OS 10.4), I was able to compile a developmental version of GPSBabel. Somewhere along the line, it occurred to me that I didn't know how to access the USB port via the command line, that is, which argument to use. The command line suggested at gpsbabel.org recommended
/dev/ttyUSB0, but there was no such 'device' on my Mac. I came across a forum post about DG-100 support for the Mac, which tipped me off to an open source driver, which has something to do with a Prolific PL-2303X USB-serial adapter on the DG-100. That got me closer.
(We break into regular programming to note that a "Jaako" posting in the forum was able to get the DG-100 working with his PowerBook, but that all the dates of the readings were from the fist day of 1970. Is that the same Jaako that went driving around Taiwan and reported it on Good Fishies, the blog of his and his incomparable girlfriend Cathy Wang's trip to Japan and China? If so, he got closer than I did. Now back to the thrilling conclusion.)
After installing that, and restarting my MacBook (along with the customary baby feline sacrifice), satisfied that my yak had been sufficiently shaved, I modified the command line slightly to look like the following:
gpsbabel -t -i dg-100 -o gpx /dev/cu.PL2303-0000103D outputfile.gpx I get the following response:
dg100_recv_byte(): read timeout
And that's where I'm left. Looking at the C code that does the work for the DG-100 with PHP-coder eyes, it's not clear what could be changed to make it work. Searching for the error message or the function name only gets me the C code or forum posts I've already looked at. Any ideas?
Time passes and Jaako reports in the comments on how he got the GlobalSat DG-100 working on a Mac. You'll need gcc to compile the C file, in which I've changed 3B1 to 0000103D. The software is GPL, so I distribute it under the same terms. Thanks Jaako for the pointer, and thanks to Mirko Parthey for the original work.