Gi-z / CSIKit

Python CSI processing and visualisation tools for Atheros, Intel, Nexmon, ESP32, FeitCSI, and PicoScenes (USRP, etc) formats.
https://Gi-z.github.io/CSIKit/
MIT License
207 stars 52 forks source link

RxSBasicSegment has no attribute cbw #37

Open DerBambus opened 1 year ago

DerBambus commented 1 year ago

Hi there, I have some measurements using Picoscenes with two usrp n210 devices, however when I try parsing them with csikit, I get the following error: Screenshot_20230324_131050 I am using the example code provided in the readme, and when I try and parse an example file py picoscenes it correctly reads the data in. Any Ideas on what this issue might be?

leonhorn99 commented 6 months ago

Hi, did you find a solution for this?

Gi-z commented 6 months ago

Provide an example of a file that causes this error and I'll look at getting it fixed asap.

leonhorn99 commented 6 months ago

csifile.zip

This is a file recorded with picoscenes from a IWL5300 nic. I am using python 3.12.2 with the ipython console and first example code provided.

Thanks a lot!

leonhorn99 commented 6 months ago

Okay, i was able to narrow it down a bit: There is no dictionary entry for version = 4 in the init function of RxSBasic, as well as no parse funktion. Thats why the parameters (like cbw) are not initialized. Since I have no real knowledge of the meaning of these bytes, I can't really contribute any further unfortunatly.

The function AbstractPicoScenesFrameSegment.read_header() assigns the 4 to self.subsegmentVersion. This might be the bug?

Thank you, Leon

leonhorn99 commented 6 months ago

I am still not sure what this version number is referring to, but after some digging in the parsing kernel and validating with the byte sequence i wrote a parsev4. This is the updated file, everything else is left as is. The only change was the addition of another 64 bit timestamp after the first one.

RxSBasicSegment.zip

Gi-z commented 6 months ago

I am still not sure what this version number is referring to, but after some digging in the parsing kernel and validating with the byte sequence i wrote a parsev4. This is the updated file, everything else is left as is. The only change was the addition of another 64 bit timestamp after the first one.

RxSBasicSegment.zip

You should be able to install with the latest commit using: pip install git+https://github.com/Gi-z/CSIKit.git. Let me know if that works for you and I'll look at deploying to pip.