Parse channel state information from raw CSI data file in Python.
- Full support for Linux 802.11n CSI Tool and Atheros CSI Tool, partial support for nexmon_csi
- At least 15 times faster than the implementation in Matlab
- Real-time parsing
cd csiread
pip3 install -r requirements.txt
python3 setup.py sdist bdist_wheel
pip3 install -U dist/csiread*.whl
import csiread
# Linux 802.11n CSI Tool
csifile = "../material/5300/dataset/sample_0x1_ap.dat"
csidata = csiread.CSI(csifile, Nrxnum=3, Ntxnum=2, pl_size=10)
csidata.read()
csi = csidata.get_scaled_csi()
print(csidata.csi.shape)
# Atheros CSI Tool
csifile = "../material/atheros/dataset/ath_csi_1.dat"
csidata = csiread.Atheros(csifile, Nrxnum=3, Ntxnum=2, pl_size=10, Tones=56)
csidata.read(endian='little')
print(csidata.csi.shape)
# nexmon_csi
csifile = "../material/nexmon/dataset/example.pcap"
csidata = csiread.Nexmon(csifile, chip='4358', bw=80)
csidata.read()
print(csidata.csi.shape)
Both CSI.payload and Atheros.payload are MPDU. scapy can parse it easily. For convenience, csiread.CSI returns the parsing result of the specified MAC header.
Read example/*.py
and csiread/csiread.pyx
for more details.
- new feature: add support for nexmon_csi
- new feature: process data faster
- new feature: add in-place operation in csiread.CSI
- new feature: add CSI.pmsg() and Atheros.pmsg() to parse message in real time.
- new feature: both CSI.payload and Atheros.payload are MPDU and stored in np.uint8 now.
- fix bug: noise will change after calling get_scaled_csi()
- fix bug: in matlab, read_log_file drops the last two packets(Atheros), but here we keep them.
- fix bug: get_scaled_csi_sm() value error.
- fix bug: csiread.CSI may not work well on big-endian computers.
- new examples: plot CSI in real time
- new example: implement log_to_file in pure Python
- new example: a better solution to the MemoryError
- update examples
- new feature: add
__getitem__
- new feature: add get_scaled_csi_sm(), apply_sm()
- fix bug: choose big endian or little endian when using Atheros, e.g. csidata.read(endian='big')
- fix bug: some value error on 32-bit computer
- fix bug: avoid built-in keyword, len -> lens
- new example: add
example/csishow.py
to plot data - new example: add
example/csisplit.py
to split the data file of linux-80211n-tool into small pieces
- fix bug: report format error
- fix bug:
count
value error - new feature: add support for atheros
- new feature: add processing functions of intel 5300: get_scaled_csi(), get_total_rss()
- new example