-
Notifications
You must be signed in to change notification settings - Fork 4
/
testFlight.sh
94 lines (74 loc) · 1.6 KB
/
testFlight.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
rm ./*.netxml
rm signals.txt
rm default.p
rm gsm_power.txt
#rm dronepath.txt
bit=0
trap ctrl_c INT
function ctrl_c() {
echo "KILL ALLLLLLLL"
kill $gps_pid
kill $kismet_pid
kill $gnuradio_pid
kill $videotime_pid
kill $readfft_pid
bit=12
}
sudo echo -e '!1 SHUTDOWN' | nc localhost 2501
sleep 1
sudo echo -e '!1 SHUTDOWN' | nc localhost 2501
sleep 1
sudo echo -e '!1 SHUTDOWN' | nc localhost 2501
sleep 1
sudo echo -e '!1 SHUTDOWN' | nc localhost 2501
sleep 1
sudo iw phy phy0 interface add mon0 type monitor > /dev/null 2>&1 &
sleep 1
sudo iw dev wlan0 del > /dev/null 2>&1 &
kismet_server > /dev/null 2>&1 &
kismet_pid=$!
echo "Kismet PID is ",$kismet_pid
echo "START VIDEO RECORDING IN 3"
sleep 1
echo "2"
sleep 1
echo "1"
sleep 1
python gpstotext.py &
gps_pid=$!
echo "gps PID is ",$gps_pid
echo "Starting up GPS"
#python3 gpsWorking.py
./top_block.py > /dev/null 2>&1 &
gnuradio_pid=$!
echo "gnuradio_pid is ",$gnuradio_pid
file_exists=0
while [ $file_exists -lt 10 ];
do
echo "Waiting for GNURADIO.."
sleep 2
[[ -s gsm_power.txt ]]
if [ $? -eq 0 ]; then
echo "GNURADIO has started!!"
let file_exists=10
fi;
done
python read_fft.py &
readfft_pid=$!
echo "Start streaming video in 3 seconds"
sleep 3
#python videoTime.py &
#videotime_pid=$!
echo "Everything up and running"
while [ $bit -lt 10 ];
do
python3 getsignals.py
sleep 5
#sudo echo -e '!1 SHUTDOWN' | nc localhost 2501
#kismet_server > /dev/null 2>&1 &
done
echo "HAHAHAHAH EXIIT !!"
#python3 approximate.py
#python3 convertPictures.py
#node uploadsignals.js