Difference between revisions of "Use Android Phone As GPS With Kismet"
Jump to navigation
Jump to search
m |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
==Using== | ==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. | #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 (" | + | #Run the "GPSd Forwarder" app, specifying the IP of the laptop plus a random port number that you will tell gpsd to listen on ("9999" in this writeup.) |
− | #Open the laptop's firewall so that gpsd can receive data from the phone app: <code>sudo firewall-cmd --add-port | + | #Open the laptop's firewall so that gpsd can receive data from the phone app: <code>sudo firewall-cmd --add-port 9999/udp</code> |
− | #Set <code>OPTIONS="udp://*: | + | #Set <code>OPTIONS="udp://*:9999"</code> in the /etc/sysconfig/gpsd file. Use systemd to start gpsd. |
#Use the <code>gpsmon</code> command to confirm that gpsd is receiving data from the GPS on the phone. | #Use the <code>gpsmon</code> command to confirm that gpsd is receiving data from the GPS on the phone. | ||
#Uncomment this line in /etc/kismet/kismet.conf: <br /><code># gps=gpsd:host=localhost,port=2947</code> and start kismet: <code>sudo kismet</code><br />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. | #Uncomment this line in /etc/kismet/kismet.conf: <br /><code># gps=gpsd:host=localhost,port=2947</code> and start kismet: <code>sudo kismet</code><br />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. | ||
#<code>sudo kismet</code> to collect the data. | #<code>sudo kismet</code> 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:<br /><code>sudo kismetdb_to_kml --in Kismet-20210116-21-57-38-1.kismet --out output.kml</code> | + | #Use the kismetdb_to_kml utility to convert a Kismet db to a KML file for use with Google Earth or other GIS tools:<br /><code>sudo kismetdb_to_kml --in Kismet-20210116-21-57-38-1.kismet --out output.kml</code><br />Kismet logs are SQLite3 database files. See https://kismetwireless.net/docs/devel/kismetdb/ |
Latest revision as of 22:39, 16 January 2021
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 ("9999" in this writeup.)
- Open the laptop's firewall so that gpsd can receive data from the phone app:
sudo firewall-cmd --add-port 9999/udp
- Set
OPTIONS="udp://*:9999"
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
Kismet logs are SQLite3 database files. See https://kismetwireless.net/docs/devel/kismetdb/