As luck would have it, I stumbled upon an old usb gps adapter in storage that came with Microsoft Office Streets and Trips way back in the day. It is branded Microsoft on the front and Pharos USA GPS-360 on the back. Before pitching it, I had to test it with the Raspberry Pi. These same steps should work with almost any distribution of Linux.Pharos USA GPS -360

I plugged it directly in as the only usb device and booted up and what do you know, when I typed ‘lsusb’:

Bus 001 Device 004: ID 067b:aaa0 Prolific Technology, Inc. Prolific Pharos

Then I ran ‘dmesg’ to see if we actually had some drivers loaded. If the excitement from it actually doing something on the Pi wasn’t enough; the thing glows blue.

Time to get an open source GPS application:

sudo apt-get install gpsd

After it installed, I wanted to test that it was actually receiving satellite data and that I could telnet to gpsd. I ran:

 sudo gpsd -N -n -D 5 -G /dev/ttyUSB0

Key switches for me:

  • -N not in daemon mode – so I can look at the out put on the screen.
  • -D 5 – sets the debugging level so I see tons of info on what is happening in real-time (I am new to gpsd)
  • -G – allows you to connect from a non localhost (I was originally connecting via telnet)

I left the default TCP port (2947) alone on gpsd so I could easily telnet by typing:

telnet raspberrypi.local 2947

This telnet screen was sort of interesting but I did not like having to dig up all the commands. Your can tell it is working if you get a response when you send:

?WATCH={"enable":true,"json":true}

We are fortunate to have a package of gpsd clients called gpsd-clients. Install it with:

sudo apt-get install gpsd-clients

I used ‘xgps’ client to actually view the results and I was very impressed that this older device still did a pretty good job when placed by a window. For most of the clients you will need to be using X11 via ssh or directly logged in to an X session on your Pi. When I plugged the lat and long into Google Maps, I was within 3 feet of my window. (I got almost no reception when I had it in the center of the room.)xgps out put of the SkyView.

Once you start receiving data from your GPS receiver, the sky is the limit. You can collect the data points and mash it up with Google maps data later or use one of the 20+ resources listed in the second link below.

Two resources for more info on gpsd: http://gpsd.berlios.de/gpsd.html and http://www.catb.org/gpsd/.


Leave a Reply