Let's say you have a GPS and you want to use it with multiple applications. On Linux, this is easy, because basically every program today utilizes GPSd for GPS communications. GPSd connects one or more clients to one or more GPS devices, and also has support for NTP (for providing time information.) However, it does not support Windows (and in fact they are fairly nasty about it) even though it's a fairly simple trick when using Cygwin.
After spending several hours looking, however, I did finally find a free (as in beer) solution that works for Windows XP. It involves the extremely hard-to-locate (but not any more!) gpsd from gps3d, a now-defunct GPS application (you can find it on the wayback machine but try not to do that - they're overloaded as it is.) June 5, 2003 is the last snapshot before the domain was recycled. A Windows distribution was provided, as well as various source and binary releases. I've saved the source off, to try to preserve it for posterity myself, although you won't need it. The program itself is not very interesting these days, but its GPS communications daemon is.
Below is a sample command line from running gpsd attaching to my bluetooth GPS receiver which I have on COM6:
gpsd -port 10001 -serial COM6 -speed 38400
The message here: host the GPS on TCP port 10001; the GPS is on COM6 and at 38400 bps. (This is bluetooth; most people will want 4800 bps for their NMEA Serial GPS devices.) As far as I know, GPS3D's gpsd only supports NMEA devices. Make sure to use a port number over 1023. I just picked a random, high number to put mine on. I believe the maximum port is a 16 bit unsigned integer, hence 65535, but I'm not 100% on that. It should go without saying (But probably doesn't) that gpsd only supports IPv4, because it is old.
This is only half of the solution. The other half is the HW VSP from www.HW-group.com. It is freely redistributable, but I have a limited amount of bandwidth available, so I have attached the file to this document but I hid it from y'all. If you need it, and the original site is down, drop me a line and I'll help you out. The software is free as in beer, but not speech; you may not make modifications.
With all that said, the rest is trivial, because of this second program. Actually, the first part is pretty trivial too, but anyway: Install and run the HW VSP program. Put 127.0.0.1
into the "IP Address" field; put the port number you used into "Port" (not "Server Port"!) Pick out a port number (under "Port Name") to remap to your serial port, and click "Create COM". Bingo! You can now connect to this port. Want to connect another port? Just run it again, pick out another port, and uh, bingo again. Currently I have the "GPS Viewer" application that came with my GPS unit, and Microsoft Streets and Trips 2006 currently viewing the same GPS.
Now, with all this said; I've managed to crash GPSd just by connecting and disconnecting a few times. It's not the most robust solution. It does, however, work. You can download the source code to GPS3D from the wayback machine (look up a bit) if you want to hack on it and figure out why it's blowing up; I couldn't be bothered. This is something that I'm not going to be doing very often. I have preserved the source, but odds are the wayback machine will still be around after I'm dead.
Those who want a fully open source solution should take a look at the GPL Null Modem Emulator (com0com) project, which also includes a TCP/IP redirector (com2tcp). This is substantially more annoying to configure, because there is no GUI, but it is free open source software. Softvaro Libre!
Those who just want a working solution and don't mind spending some money should definitely go with Franson GPSgate. It will detect your GPS and automatically create four virtual ports which talk to it. GPSgate is intended for GPS use, and you know you'll be able to get meaningful support. I tested it and it worked great the first time. It will even find and configure bluetooth devices for you (once they're linked to your machine; they need not be paired.) I put this down at the bottom because it's not a paid advert, although I would gladly move it to the top of the article in exchange for a registration key :)
Attachment | Size |
---|---|
gpsd.exe_.gz (4.93 KB) | 4.93 KB |