Garmin Etrex with Kismet and GpsDrive
From Unix's Wiki Page
- 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
As first you have to download few tools that we are going to use later.
Download this 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 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. r GPSD,R=1 $GPRMB,A,,,,,,,,,,,,A,A*0B $GPGGA,050726,3748.4356,N,12214.6037,W,1,06,1.4,45.5,M,-27.8,M,,*4B $GPGSA,A,3,,06,15,16,,21,22,,29,,,,2.9,1.4,2.5*36 $GPGSV,3,1,09,03,18,315,00,06,41,152,44,15,61,323,34,16,27,271,35*7C $GPGSV,3,2,09,18,82,255,00,21,65,038,41,22,43,233,37,26,31,058,00*74 $GPGSV,3,3,09,29,23,046,37*4C $GPGLL,3748.4356,N,12214.6037,W,050726,A,A*59 r 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.
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 favorit 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 databse and its table. 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 -> Settins 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 )(
- 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 :)
If you want you can use Google Earth to get a better view. Unfortunately Google Earth doesn't work on Linux right now. I found a wiki that describes how to emulate it on linux but it didn't work on my Ubuntu. You can find the wiki here -> http://gentoo-wiki.com/HOWTO_Install_GoogleEarth_with_wine
After running this script it will create a file ap.kml. Now you can Open this file with Google Earth. Have fun...
I appologize for my bad English. If you have any additional thing please feel free to contact me. (email@example.com) Thx