Giter Site home page Giter Site logo

ingeniousfrog / csiread Goto Github PK

View Code? Open in Web Editor NEW

This project forked from citysu/csiread

0.0 1.0 0.0 1.61 MB

A fast channel state information parser for Intel, Atheros and Nexmon

License: MIT License

Python 83.48% Shell 0.41% Makefile 0.36% C 15.75%

csiread's Introduction

csiread

Parse channel state information from raw CSI data file in Python.

Install

cd csiread
pip3 install -r requirements.txt
python3 setup.py sdist bdist_wheel
pip3 install -U dist/csiread*.whl

Usage

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.

contents of packets

contents of packets

real-time plotting

contents of packets

Log

v1.3.5

  1. new feature: add support for nexmon_csi

v1.3.4

  1. new feature: process data faster
  2. new feature: add in-place operation in csiread.CSI
  3. new feature: add CSI.pmsg() and Atheros.pmsg() to parse message in real time.
  4. new feature: both CSI.payload and Atheros.payload are MPDU and stored in np.uint8 now.
  5. fix bug: noise will change after calling get_scaled_csi()
  6. fix bug: in matlab, read_log_file drops the last two packets(Atheros), but here we keep them.
  7. fix bug: get_scaled_csi_sm() value error.
  8. fix bug: csiread.CSI may not work well on big-endian computers.
  9. new examples: plot CSI in real time
  10. new example: implement log_to_file in pure Python
  11. new example: a better solution to the MemoryError

v1.3.3

  1. update examples
  2. new feature: add __getitem__
  3. new feature: add get_scaled_csi_sm(), apply_sm()

v1.3.2

  1. fix bug: choose big endian or little endian when using Atheros, e.g. csidata.read(endian='big')

v1.3.1

  1. fix bug: some value error on 32-bit computer
  2. fix bug: avoid built-in keyword, len -> lens
  3. new example: add example/csishow.py to plot data
  4. new example: add example/csisplit.py to split the data file of linux-80211n-tool into small pieces

v1.3.0

  1. fix bug: report format error
  2. fix bug: count value error
  3. new feature: add support for atheros
  4. new feature: add processing functions of intel 5300: get_scaled_csi(), get_total_rss()
  5. new example

csiread's People

Contributors

citysu avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.