Use Android Phone As GPS With Kismet
Jump to navigation
Jump to search
Installing
- Install "GPSd Client" app on the Android phone. It will be called "GPSd Forwarder" once it's installed.
- Install gpsd and kismet on the laptop.
Using
- If you will be mobile, turn off wifi on the phone and disconnect the laptop from any wifi network. Tether the laptop to the phone via USB and connect it to the internet via the phone. The goal is to use the phone for network connectivity so that the laptop wifi adapter can be used for scanning by kismet.
- Run the "GPSd Forwarder" app, specifying the IP of the laptop plus a random port number that you will tell gpsd to listen on ("NNNN" in this writeup.)
- Open the laptop's firewall so that gpsd can receive data from the phone app:
sudo firewall-cmd --add-port NNNN/udp
- Set
OPTIONS="udp://*:NNNN"
in the /etc/sysconfig/gpsd file. Use systemd to start gpsd. - Use the
gpsmon
command to confirm that gpsd is receiving data from the GPS on the phone. - Uncomment this line in /etc/kismet/kismet.conf:
# gps=gpsd:host=localhost,port=2947
and start kismet:sudo kismet
Note that this line will, in the future, cause kismet to automatically start gpsd via systemd if it is not already running. If the phone isn't connected as a GPS at that point, errors to that effect will be logged. There are no other ill effects. sudo kismet
to collect the data.- Use the kismetdb_to_kml utility to convert a Kismet db to a KML file for use with Google Earth or other GIS tools:
sudo kismetdb_to_kml --in Kismet-20210116-21-57-38-1.kismet --out output.kml