Hardware Reference
In-Depth Information
Setting up a GPS waypoint logger
When you can't travel with your Pi and you can't be within the Wi-Fi range to
monitor its position in real time, you can still see where it has been by recording
and analyzing GPX iles —a standard file format for recording GPS waypoints,
tracks, and routes. Use the following command to start logging:
pi@raspberrypi ~ $ gpxlogger -d -f /tmp/gpslog.gpx
The -d argument tells gpxlogger to run in the background and the -f argument
specifies the logfile. Before you open up the log file in Google Earth, it's important
that the gpxlogger process has quit properly, otherwise you might end up with a
broken log (usually this can be fixed by adding a closing </gpx> tag to the end of the
file). Kill the process using the following command:
pi@raspberrypi ~ $ killall gpxlogger
Next, start the simple Python HTTP server:
pi@raspberrypi ~ $ cd /tmp && python -m SimpleHTTPServer
Then download the log file to your computer through the following address:
http://[IP address]:8000/gpslog.gpx
Now in Google Earth, under the File drop-down menu, select Open… and point
to your log file. Click on OK in the GPS Data Import dialog that follows, and you
should see a post for your GPS device under Temporary Places in the sidebar to the
left and time controls that can be used to play back the travel route.
Mapping GPS data from Kismet
If you run Kismet, which was discussed in the Monitoring Wi-Fi airspace with Kismet
section of Chapter 4 , Wi-Fi Pranks - Exploring Your Network , with GPS support, it will
record geographic information about the access points to ~/kismetlogs/Kismet-
[date].netxml . To massage this data into the KML format that Google Earth
expects, we need to install an additional utility called GISKismet .
1. It's written in Perl and requires a couple of modules to be installed first:
pi@raspberrypi ~ $ sudo apt-get install libxml-libxml-perl libdbi-
perl libdbd-sqlite3-perl
2.
Now we need to download and install the GISKismet utility itself, with the
following command sequence:
pi@raspberrypi ~ $ wget http://www.intestinate.com/giskismet-
svn30.tar.bz2
pi@raspberrypi ~ $ tar xvf giskismet-svn30.tar.bz2
 
Search WWH ::




Custom Search