Created
April 23, 2021 13:54
-
-
Save bakueikozo/691abcf1f685e04763c269a2456deaf0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gps3 import gps3 | |
gps_socket = gps3.GPSDSocket() | |
data_stream = gps3.DataStream() | |
gps_socket.connect() | |
gps_socket.watch() | |
for new_data in gps_socket: | |
if new_data: | |
data_stream.unpack(new_data) | |
if data_stream.TPV['lat'] == 'n/a' : | |
continue | |
print data_stream.TPV['time'] ,",", data_stream.TPV['lat'],",",data_stream.TPV['lon'] | |
break |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------------- | |
bssid / frequency / signal level / flags / ssid | |
c8:5a:9f:46:8a:6c 2462 -63 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] F660A-tXKQ-G | |
10:6f:3f:f3:0f:72 2412 -22 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] URoad-6F1CCC | |
00:1c:7b:fb:21:9c 2437 -73 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] BCW710J-C77AE-G | |
38:f8:5e:73:c1:23 2412 -85 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] HUMAX-3C116 | |
7c:8f:de:57:83:5a 2462 -87 [WPA-PSK-CCMP][WPA2-PSK-CCMP][WPS][ESS] 7C8FDE57835B-2G | |
4c:e6:76:70:2d:48 2437 -88 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] 4CE676702D48 | |
2021-04-23T13:47:23.000Z , 35.********** , 139.********* | |
----------------- | |
bssid / frequency / signal level / flags / ssid | |
c8:5a:9f:46:8a:6c 2462 -65 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] F660A-tXKQ-G | |
10:6f:3f:f3:0f:72 2412 -19 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] URoad-6F1CCC | |
00:1c:7b:fb:21:9c 2437 -76 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] BCW710J-C77AE-G | |
38:f8:5e:73:c1:23 2412 -85 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] HUMAX-3C116 | |
7c:8f:de:57:83:5a 2462 -91 [WPA-PSK-CCMP][WPA2-PSK-CCMP][WPS][ESS] 7C8FDE57835B-2G | |
4c:e6:76:70:2d:48 2437 -88 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] 4CE676702D48 | |
94:09:37:41:7b:5d 2412 -87 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] HUMAX-17B50 | |
2021-04-23T13:47:34.000Z , 35.********** , 139.******** | |
----------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=GPS/SSID Scanner | |
After=syslog.target | |
[Service] | |
Type=simple | |
WorkingDirectory=/home/pi | |
ExecStart=/home/pi/scan.sh | |
TimeoutStopSec=5 | |
User=pi | |
[Install] | |
WantedBy = multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILENAME=`TZ=-9 date "+%Y%m%d_%H%M%S"` | |
mkdir scanlog | |
while true | |
do | |
wpa_cli -i wlan0 scan | |
sleep 10 | |
echo "-----------------" >> scanlog/${FILENAME}.txt | |
wpa_cli -i wlan0 scan_result >> scanlog/${FILENAME}.txt | |
python /home/pi/gpsmon.py >> scanlog/${FILENAME}.txt | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment