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.
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.
As first you have to download few tools that we are going to use later.
Download these packages with apt-get:
# sudo apt-get install gpsd
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.
[4309567.512000] mct_u232 1-2:1.0: MCT U232 converter detected
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
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.
Kismet has to work if you have a Cisco 350 Series Card you might have a look at this howto 
Edit following entries in /etc/kismet/kismet.conf with your favourite editor:
gps=true waypoints=true waypointdata=~/.gpsdrive/way.txt
Save it and exit.
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
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.
Now we will start everything and get ready for wardriving )(
Now you should see the accesspoints in your map. Of course only if kismet found something. 🙂
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  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…