Wardriving Using An Ubuntu Notebook With Garmin Etrex, Kismet, And GPSDrive 

This tutorial is about wardriving using GPS.  It explains how to install Garmin Etrex on Ubuntu and how to configure it. It also shows how to use Garmin with GPSDrive and how to convert  the data to an xml file which can be imported by Google Earth.

Status (11/16/2005)

  • Ubuntu 5.10 "The Breezy Badger"
  • Kernel 2.6.12-9
  • Garmin Etrex Camo


To connect the Garmin Etrex with my notebook (Sony Vaio TR5MP) I needed a serial cable and a USB converter. You can order the cable and the converter at http://pfranc.com/cgi-bin/pub/u_OR?pid=eUSB1.

Software preparation

As first you have to download few tools that we are going to use later.

  • gpsd
  • gpsdrive
  • kismet

Download these packages with apt-get:

# sudo apt-get install gpsd 
# sudo apt-get install gpsdrive
# sudo apt-get install kismet

Plugin Garmin and prepare gpsd

I had a couple of problems with configure Garmin. First plug in only the converter. You can check it with dmesg if the converter was recognised.

# dmesg
[4309567.512000] mct_u232 1-2:1.0: MCT U232 converter detected 
[4309567.523000] usb 1-2: MCT U232 converter now attached to ttyUSB0

The converter should now be attached to ttyUSB0, which we use later to start gpsd. Now turn on the Garmin Etrex and wait until you have a good signal and plug it in at the converter. You can now test if Ubuntu recieve data from Garmin.

# cat /dev/ttyUSB0

Now you can start gpsd.

# gpsd -p /dev/ttyUSB0

To test if you recieve data you can connect to gpsd over telnet and type "r". It should print out some data. Type "r" again to stop it

# telnet localhost 2947
Connected to localhost.localdomain.
Escape character is '^]'.
GPSD,R=1 $GPRMB,A,,,,,,,,,,,,A,A*0B
$GPGSV,3,3,09,29,23,046,37*4C $GPGLL,3748.4356,N,12214.6037,W,050726,A,A*59
GPSD,R=0 quit

There is one problem I couldn't solve. When I close a application that used gpsd I couldn't use gpsd agin until I restarted gpsd. I also have to plug out Garmin and plug it in again. There was a message in dmesg:

[4310134.687000] drivers/usb/serial/mct_u232.c: MCT USB-RS232: unsupported baudrate request 0x0, using default of B9600

If someone has a solution for this please let me know.

Run Kismet

Kismet has to work if you have a Cisco 350 Series Card you might have a look at this howto [1]

Edit following entries in /etc/kismet/kismet.conf with your favourite editor:


Save it and exit.

Prepare GpsDrive

In order to use GpsDrive with Kismet we have to change some settings. GpsDrive is able to save the waypoints in a SQL-Database. It is highly recommended to use it. If you want to use it you have to install the mysql-server, mysql-client and libmysqlclient packages and then import the create.sql file that creates a database and its tables. It also creates a user gast / gast. Start the mysql server and import the create.sql file

# /etc/init.d/mysql start
# mysql -u root < /usr/share/gpsdrive/create.sql

If you have set a mysql-root password you have to use the option -p, for example

# mysql -u root -p < /...../create.sql

Now run GpsDrive. If everything is ok you should see now a Map. (The data you see are dummy data.) We will connect Garmin later. If you want to use MySQL check the checkbox Use SQL.

Your map will be different because it is your first time to use GpsDrive. Now go to Preferences -> Settings 2 and set Interface to /dev/ttyUSB0. Check also Test for Garmin and Use serial conn.

Now you can close GpsDrive.

Start everything

Now we will start everything and get ready for wardriving )(

  • Plugin Converter.

  • Plugin Garmin (be careful that you have a good signal).

  • Check data with

    # cat /dev/ttyUSB0
  • Run gpsd with

    # gpsd -p /dev/ttyUSB0
  • Run kismet.

  • Run gpsdrive.

Now you should see the accesspoints in your map. Of course only if kismet found something. :)

Google Earth

If you want you can use Google Earth to get a better view. Download and install GoogleEarth for Linux: http://earth.google.com/download-earth.html

In order to use Google Earth you have to run this script [2] which I found here http://www.larsen-b.com/Article/212.html THX.

After running this script it will create a file ap.kml. Now you can open this file with Google Earth. Have fun...

Share this page:

2 Comment(s)