Skip to content

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 | ....

The header has always a size 272 bytes.

  • 0 - 3 byte (Unsigned int) - Size of CSI data
  • 8 - 11 byte (Unsigned int) - FTM clock
  • 46 byte (Unsigned int) - Number of RX
  • 47 byte (Unsigned int) - Number of TX
  • 52 - 55 byte (Unsigned int) - Number of subcarriers
  • 60 - 63 byte (Unsigned int) - RSSI of TX1
  • 64 - 67 byte (Unsigned int) - RSSI of TX2
  • 68 - 73 byte (Unsigned int) - Source MAC address
  • 92 - 95 byte (Unsigned int) - Rate flags
    • 3 - 0 bit -
      • HT, VHT, HE, EHT - MCS index
      • Legacy OFDM
        • 0 - 6 Mbps
        • 1 - 9 Mbps
        • 2 - 12 Mbps
        • 3 - 18 Mbps
        • 4 - 24 Mbps
        • 5 - 36 Mbps
        • 6 - 48 Mbps
        • 7 - 54 Mbps
      • CCK
        • 0 - 1 Mbps
        • 1 - 2 Mbps
        • 2 - 5.5 Mbps
        • 3 - 11 Mbps
    • 10 - 8 bit - rate format,
      • 0 - Legacy CCK,
      • 1 - Legacy OFDM
      • 2 - High-throughput (HT)
      • 3 - Very High-throughput (VHT)
      • 4 - High-efficiency (HE)
      • 5 - Extremely High-throughput (EHT)
    • 13 - 11 bit - Channel width
      • 0 - 20MHz
      • 1 - 40MHz
      • 2 - 80MHz
      • 3 - 160MHz
      • 4 - 320MHz
    • 14 bit - antenna A
      • 1 - active
      • 0 - deactive
    • 15 bit - antenna B
      • 1 - active
      • 0 - deactive
    • 16 bit - LDPC
      • 1 - enabled
      • 0 - disabled
    • 17 bit - Spatial streams
      • 0 - one
      • 1 - two
    • 19 bit - Beamforming
      • 0 disabled
      • 1 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 number
  • 2 - 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
We also provide parsing scripts for Matlab and Python.