You might actually be looking for this other page from which I get occasional page referrals. It has ready-made binaries.
On Linux, it is easy to share a GPS between various applications. Most of them have already been tweaked to support GPSd, a BSD-licensed program that rebroadcasts GPS information via TCP/IP. It listens for a TCP connection on port 2947, and when you connect to it, you get a GPS interface. GPSd supports a ton of GPS types (NMEA, FV-18, SiRF-II, Trimble TSIP, Tripmate, Earthmate, iTrax, Talk, Garmin, True North, and Evermore protocols) and is quite cheerful about it in general.
Unfortunately, GPSd does not officially have Windows support, and in fact they are not willing to do any work even to make it work under Cygwin. The official page, in fact, says:
No, we don't support Windows — get a better operating system. Our main focus is open-source Unixes — Linux, and the *BSD family. We'll support proprietary Unixes and hybrids like Mac OS X if it's not too much work (and it usually isn't).
That's interesting, because it's not too much work to get it working on Cygwin, either. Renderlab has a nice page on getting it to work, but that's only half the problem. That guide is on "Gpsd on Cygwin for Kismet V0.1" and the instructions did not work for me precisely as written. In addition, we don't care about Kismet or any other particular program; they are outside the scope of this guide, the goal of which is to get gps sharing working on Windows.
First, you will need to build an appropriate GPSd. You will need to install Cygwin for this; you need certain packages to be installed. From Renderlab's page on the subject:
1.3 Under Development, add the following packages to be installed:
gcc
libtool
makeUnder libs, add the following:
libncures
libncurses-develUnder Utils, add the following:
patch
patch-utils
tzcode time
Now is the time when you patch and compile gpsd. You need Version 2.30 to match the patch (which you can get from the end of this comment; the file is also on Renderlab here. I wouldn't normally link direct to a download but it's just a teensy patch file and again, you can (and should) download it from the end of this page.
Download the patch (cygwin-2.diff) and, after unpacking the sources, copy it into that directory. Go into the directory (should be "gpsd-2.30") and type the following:
patch < cygwin-2.diff
This will patch four files. Next, we want to configure and compile the program. Unfortunately, there's some issue with what GPSd's code is expecting, and what the headers for the X Window System look like today that causes such a compile to fail if you just run ./configure
before compiling. Here's what I typed to compile and install:
./configure --prefix=/usr/local --without-x && make && make install
This will install gpsd into /usr/local
, where all programs that are not part of the OS belong – or, in this case, not part of cygwin. It will end up in /usr/local/sbin
, or from Windows' point of view, c:\cygwin\usr\local\bin
. This program should be installable as an NT service using cygrunsrv or, on windows, Fireburner.
Start GPSd by running /usr/local/sbin/gpsd /dev/comN
, where N
is the number of your com port. In my case, it's COM6 for my bluetooth serial port that corresponds to my GPS. You can then test by telnetting to localhost, port 2947.
~/gpsd-2.30$ /usr/local/sbin/gpsd /dev/com6
~/gpsd-2.30$ ps ax | grep gpsd
4768 1 4768 4768 ? 12638 12:09:01 /usr/local/sbin/gpsd
~/gpsd-2.30$ telnet localhost 2947
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
r
GPSD,R=1
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
Your mileage may vary - this worked for me the first time I ran GPSd, but not thereafter. Unfortunately GPSd won't work for all types of applications - only those which use GPSd, like Kismet and GPSDrive.
Attachment | Size |
---|---|
patch needed for cygwin support (2.63 KB) | 2.63 KB |
additional patch needed for cygwin support with more recent versions (see comments) (342 bytes) | 342 bytes |
Additional changes
Probably due to (recent?) changes in cygwin I had to make the following additional changes:
http://pastebin.com/YLiLb372
Earthmate LT-20 on 64bit Windows?
Would be nice if someone would write software to take the raw data over USB from the LT-20 and decode it to NMEA, and do it in 64 bit Windows.
Using RS-232C ports, real or virtual, is so 20th Century. :P If someone would deign to write a virtual COM port driver for the USB Earthmate GPS devices for 64 bit Windows then they could be used with all the GPS programs still relying on the antiquated RS-232C protocol.
there's always gpsd in a linux vm
These days, the cost of running a small Linux distribution in a virtual machine to run a daemon or two is easy to pay. My PC is practically an antique (by computing standards) and I've got six cores, 8GB, an SSD and two HDDs in it. Sometimes I even run Linux under Linux, just to perform some task that I want well-isolated and which can lead to free reboots.