csiread icon indicating copy to clipboard operation
csiread copied to clipboard

Parsing Nexmon .pcap files

Open munir01 opened this issue 7 months ago • 4 comments

Thank you for this amazing work! I have a question about parsing CSI and RSSI data using csiread. If I know that the CSI data was collected using RPi 4B using this precompiled binary of Nexmon, is there a way to tell if I should use csiread.Nexmon or csiread.NexmonPull46? Alternatively, given a .pcap file, how can I decide if we should use csiread.Nexmon or csiread.NexmonPull46? I would like to get RSSI in addition to CSI and the only way to get it through csiread.NexmonPull46

Also, there is no csiread.NexmonPull46.read() function. So, I created a similar one like csiread.Nexmon.read(), which basically calls super().read().

Here is the sample code that I am using:

csi_file_path = './abc.pcap'
csidata = csiread.NexmonPull46(csi_file_path, chip='43455c0', bw=80) 
csidata.read()
csidata.display(0)

Here is the output:

63045 packets parsed
0th packet:
  file                : ./abc.pcap
  count               : 63045
  nano                : False
  sec                 : 1720688287
  usec                : 331678
  caplen              : 1084
  wirelen             : 1084
  magic               : 0x1111
  src_addr            : 7c:10:c9:e0:20:dc
  seq                 : 0
  core                : 0
  spatial             : 0
  chan_spec           : 0xe02a
  chip_version        : 0x65
  csi                 : (256,)
  rssi                : 192
  fc                  : 148

Looking at value 192, does it look like it is reading the correct RSSI?

Thank you!

munir01 avatar Jul 22 '24 18:07 munir01