Just a quick post on my gpsdrive setup. I hadn't used it for a couple of years, but that didn't matter really as it hasn't changed much in that time either. The realtime downloadable map support is still only expedia.{de,com} but it would be cool to add in google too. I found a Spanish website where someone has done all the hard work generating a grid of google map URLs and I wrote a script to download and apply them to the coordinates file.
All the networking hardware was bought from Solwise, I wrote a script which automates the downloading and adding grids of google maps to gpsdrive. Next I want to plot position by GPS in real time within Google maps itself within firefox and upload WLAN APs dynamically, which will require a mobile internet connection, thereby an interesting alternative to gpsdrive. Would be cool to be able to run that in offline mode too. Will upload scripts, photos, screenshots etc of my current setup soon.
One time setup
Starting session
Adding Google maps
Have fun!
- Laptop : Lenovo Thinkpad T60 60GB/1GB/Intel 945GM graphics and 82573L/3945ABG networking
- GPS : Navilock BT-313T SiRF III, bluetooth, rechargeable over USB (note this device will recharge by usb whilst already streaming data over bluetooth, but will not allow a bluetooth connection if the USB connections is made first)
- Wi-Fi card: Engenius/Senao WL-0011MP+ 802.11b PCMCIA Card with 2 external antenna connectors (MMCX), Prism 2.5 chipset. I compiled the hostapdriver to get monitor mode for this card.
- Wi-Fi antennae: 2.4GHz Omni (7.8dB, magnetized base - sticks well to car roof ) and Flat (13dB, poynting.co.za ) here is the correct picture
- OS : Linux (RHEL5 Client, updated)
- GPS software : gpsdrive
- Wi-Fi audit software : kismet
- Maps: Google Maps
- Maps Calculator: google'd and found this great un-attributed page which is likely written by someone in the Grupo Tecnologias Multimedia at the UVA. Here is the html source code in case the site disappears.
- Maps Script: automates the downloading of the multiple map URLs generated by the Maps Calculator above, renumbers and inserts them into the ~/.gpsdrive/map_koord.txt file for use by gpsdrive. The google-maps-script needs to be adjusted for the location where you saved the maps file above. Note that the script depends on the "elinks" browser but, if you can't get it and have "lynx" for example then just edit appropriately.
- GPS start script: gps-start
All the networking hardware was bought from Solwise, I wrote a script which automates the downloading and adding grids of google maps to gpsdrive. Next I want to plot position by GPS in real time within Google maps itself within firefox and upload WLAN APs dynamically, which will require a mobile internet connection, thereby an interesting alternative to gpsdrive. Would be cool to be able to run that in offline mode too. Will upload scripts, photos, screenshots etc of my current setup soon.
One time setup
- Configure system to connect to the GPS. If using bluetooth, see gps-start for details, configuring rfcomm.conf. Test: turn on GPS, as root run gps-start and "cat /dev/rfcomm1" should show NMEA sentences streaming by.
- Configure gpsd. If the gspdrive's gpsd is not working properly try the latest gpsd. Test: "telnet localhost 2947" and issue
commands like "p" for position (the gpsd man page has details) and check reponses - Configure the Wi-Fi card to use an appropriate driver which supports monitor mode (e.g. hostap, madwifi, ...). Test: change to monitor mode and check with iwconfig
- Configure Kismet (kismet.conf) for the card (e.g. "source=hostap,wlan0,wlan0", "waypointdata=%h/.gpsdrive/way_kismet.txt" and "suiduser=$your_username". Test: run kismet and check WLAN info
- Configure mysql for the database gspdrive will use to store WLAN AP and Geo data: using the create.sql script from gpsdrive makes it easier. Test: check with some mysql queries, e.g. echo "select * from waypoints limit 3" | mysql -u gast -pgast geoinfo
- Save and edit the scripts in appropriate locations: /root/bin/gps-start and ~/.gpsdrive/google-maps-script
- Configure gpsdrive to read the file kismet is writing to "way_kismet.txt"
Starting session
- Turn GPS on and run gps-start as root: screenshot
- Run kismet as root. screenshot
- Run gpsdrive as your regular (unprivileged) user that you also configured kismet for. screenshot
Adding Google maps
- Best to not have gpsdrive running
- Go to http://gtm.tel.uva.es/ztep/maps/dmap.htm and browse to the area you want. I tend to set the zoom between 12-17 to get 8x10 maps in a grid, overlap 10% (rather than the default 5%) to guarantee decent overlap, and of course toggle to gpsdrive. Here is an screenshot of one of my configurations. Once the maps are generated, save the page which doesn't need to be rendered fully by your browser so no need to wait for all the thumbnail images to load.
- Run the google-maps-script which I've put in ~/.gpsdrive for testing, but ~/bin is prob better. This scripts auto downloads and adds the multiple google maps for gpsdrive to use. I decided to stop using Expedia completely (such ugly maps!) and edited them out of ~/.gpsdrive/map_koord.txt and currently have 865 Google maps there from approx 12 runs of this.
- Start gpsdrive and you should be able to navigate to your new Google maps
Have fun!
awesome, just what I was looking for!
ReplyDeleteunfortunately it doesn't seem to be adding and renumbering the map_koord.txt file for me, but if I do that manually it works a treat!
actually I just didn't have elinks installed, doh!
ReplyDeleteworks perfectly now!
AWESOME!
Hi Eloc, thanks for your post. To help you I'd need to know what was going wrong when you run the script. I've stopped maintaining it as I don't use it anymore myself! (the reason being is I use a BlackBerry with GPS and Google Maps for navigation) and don't have time or the inclination for combined WiFi wardriving/GPS tracking. The script is a hack, ideally gpsdrive itself would be trivially extended to download Google Maps tiles (as it does already from Expedia) and this is doable for someone with the right coding skills. But back to the problem. The dmap.htm should contain a bunch of tile URLs, which the script goes and downloads in turn. Does this happen? Run the script with "bash -x /path/to/script" to see. Once downloaded the correct coordinates need to go into the coordinate file. The script might get that wrong, though I tried to make it error free, no glue script (with dependencies) can ever be.
ReplyDeleteNice to see you are using an Eee PC and getting a be- hats off to you!
Спасибо классная статья ;)
ReplyDeleteHey,
ReplyDeletecan you upload the google-maps-script again?
the link seems to be broken.
Done, uploaded script and all the other files I'd forgotten about transfering from my old server. That script though is nearly 2 years old and not tested recently.
ReplyDeleteAm more interested in plotting wireless info (WLAN, 3G/EDGE/GPRS, even Bluetooth, directly onto Google Maps - will work on that when I get some time.