The official Python toolbox for parsing the PicoScenes .csi files.
- Support Linux, macOS and windows
- Easy to use
- Faster parsing than the MATLAB implementation
- High scalability
- The official toolbox for parsing .csi
- Install TDM-GCC-64 (choose MinGW-w64 based version, version 10.3+);
- Set Compiler to MinGW64 using mingw64ccompiler
pip install git+https://github.com/imba-tjd/mingw64ccompiler
python -m mingw64ccompiler install_specs # Run once
python -m mingw64ccompiler install # Works with venv
- Git clone this repository with
--recursive
option.
git clone https://github.com/Herrtian/PicoscenesToolbox.git --recursive
- install python and dependency
sudo apt update
sudo apt install python3
sudo apt install python3-pip
- If you are Chinese user, you can change pip source to accelerate download speed.
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
- install dependency
pip3 install -r requirements.txt
- Build the program
python3 setup.py build_ext --inplace
rx_by_usrpN210.csi is a sample binary csi file created by Picoscenes,now we will use it to create a chart.
# main.py
from picoscenes import Picoscenes
import numpy as np
import matplotlib.pyplot as plt
i = 0 # stands for the first frame of csi frames
frames = Picoscenes("rx_by_usrpN210.csi")
numTones = frames.raw[i].get("CSI").get("numTones")
SubcarrierIndex = np.array(frames.raw[i].get("CSI").get("SubcarrierIndex"))
Mag = np.array(frames.raw[i].get("CSI").get("Mag"))[:numTones]
plt.title(" Magnitude Demo")
plt.xlabel("x axis subcarryindex ")
plt.ylabel("y axis Magnitude")
plt.plot(SubcarrierIndex, Mag)
plt.show()
main.py is included in the working dir.
This programm shows the first frame of rx_by_usrpN210.csi ,and draws the picture whose x-ray stands for SubcarrierIndex and y-ray stands for Magnitude.
python3 main.py
If you run the programm successfully, you will get the result like this :
If you want to know more details about PicoscenesToolbox , you can seek ./docs and wiki
If you have some questions on PicoscenesToolbox, please make me know and submit issues what you met.
Welcome to give this programm a star or fork.
- PicoScenes: A powerful Wi-Fi sensing platform middleware for a wide range of hardware.
- This project was released by Zhiping Jiang.
- csiread: A fast channel state information parser for Intel, Atheros, Nexmon and ESP32 in Python.
- This project released by citysu/csiread inspires PicoscenesToolbox.
The code in this project is licensed under MIT license. That means if you are building project by this programm, I would greatly appreciate if you could cite this repository.
- "Tian Teng. PicoscenesToolbox: An official tool plugins for parsing .csi from picosecenes in Python. (2021). https://github.com/Herrtian/PicoscenesToolbox."