CSI format
FeitCSI provides the raw data obtained from NICs. The CSI of pilot subcarriers is too low to be useful. It is necessary to fix this by the interpolation or other methods.
Data structure
Saved FeitCSI data consists of the header
and CSI data
. Usually many measurements are stored in the one file. So the file contains header, CSI data | header, CSI data | header, CSI data | ...
.
header
The header
has always a size 272 bytes.
0 - 3 byte
(Unsigned int) - Size ofCSI data
8 - 11 byte
(Unsigned int) - FTM clock46 byte
(Unsigned int) - Number of RX47 byte
(Unsigned int) - Number of TX52 - 55 byte
(Unsigned int) - Number of subcarriers60 - 63 byte
(Unsigned int) - RSSI of TX164 - 67 byte
(Unsigned int) - RSSI of TX268 - 73 byte
(Unsigned int) - Source MAC address92 - 95 byte
(Unsigned int) - Rate flags3 - 0 bit
-- HT, VHT, HE, EHT - MCS index
- Legacy OFDM
0
- 6 Mbps1
- 9 Mbps2
- 12 Mbps3
- 18 Mbps4
- 24 Mbps5
- 36 Mbps6
- 48 Mbps7
- 54 Mbps
- CCK
0
- 1 Mbps1
- 2 Mbps2
- 5.5 Mbps3
- 11 Mbps
10 - 8 bit
- rate format,0
- Legacy CCK,1
- Legacy OFDM2
- High-throughput (HT)3
- Very High-throughput (VHT)4
- High-efficiency (HE)5
- Extremely High-throughput (EHT)
13 - 11 bit
- Channel width0
- 20MHz1
- 40MHz2
- 80MHz3
- 160MHz4
- 320MHz
14 bit
- antenna A1
- active0
- deactive
15 bit
- antenna B1
- active0
- deactive
16 bit
- LDPC1
- enabled0
- disabled
17 bit
- Spatial streams0
- one1
- two
19 bit
- Beamforming0
disabled1
enabled
CSI data
The size of CSI data is in the header on bytes 0 - 3. It should 4 * number of RX * number of TX * number of subcarriers .
Every CSI value has 4 bytes.
0 - 1 byte
(Signed int) - real number2 - 3 byte
(Signed int) - imaginary number
Parsing data
As we mention in introduce, the data consists of multiple blocks. Every block has header and CSI data. You can look at pseudocode how to parse FeitCSI data file.
for (i = fileSize; i < fileSize; i += step)
header = parseHeader( file[i:i+272] );
csiData = parseCsi( file[i+272; header.sizeOfCsiData] );
step = 272 + header.sizeOfCsiData;
end for