File size: 2,119 Bytes
d3b87bf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash

<<com

This script extract the MU-MIMO feedbacks of the available stations
from the raw pcap captures.

Copyright (C) 2022  Khandaker Foysal Hauqe
email: haque.k@northeastern.edu

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

com

cd "raw_data"

env=("LAB1" "LAB2" "CONF1")
env_correspondance=("0" "1" "2")

MAC=("f0:d4:15:ca:4b:ee" "f0:d4:15:ca:4a:d6" "98:59:7a:8a:c0:28" "f0:d4:15:ca:4a:8b" "f0:d4:15:ca:4a:c2" "98:59:7a:8a:47:65" "98:59:7a:8a:44:b3" "f0:d4:15:ca:a3:2d" "98:59:7a:8a:43:e6" "98:59:7a:8a:5e:c6" "98:59:7a:8a:60:88" "98:59:7a:8a:5e:6c" "f0:d4:15:ca:4c:bb" "f0:d4:15:ca:8b:04" "f0:d4:15:ca:a5:12" "98:59:7a:8a:5e:49" "f0:d4:15:ca:4f:a9" "f0:d4:15:ca:50:0d")


for i in ${!env[@]};do

	echo "The Environment is '${env[i]}'"

	cd "${env[i]}"
	pwd

	
	for FILENAME in ./*
	do
		editcap -r $FILENAME ${FILENAME:2:2}'_edited' 10000-99999999
		sleep 2
		mv ${FILENAME:2:2}'_edited' $FILENAME

		echo "$FILENAME"
		Name_Start=${FILENAME:2:2}
		echo "$Name_Start"

		for sta in "${MAC[@]}"
		do 
			last_two_MAC="${sta: -2}"

			if [ "$last_two_MAC" == "$Name_Start" ]
			then
				echo "the matched MAC address is '$sta'"

				mkdir -p ../../vtilde_matrices ../../angles
                Name_End="_${env_correspondance[i]}.npy"
                Vmatrices='../../vtilde_matrices/'$Name_Start$Name_End
                Angles='../../angles/'$Name_Start$Name_End

                echo "$Vmatrices"
                python ../../../Wi-BFI/main.py $FILENAME AX SU 4x2 160 $sta 3000 $Vmatrices $Angles

			fi
		 done

	done

	cd ../

done