Page 1 of 1

How to parse the received CSI data?

Posted: Mon May 09, 2022 11:47 pm
by Guanxiong
This is an example of my collected CSI: [79 112 4 0 -1 22 -1 23 0 21 0 21 0 22 1 21 1 21 2 21 3 20 6 21 5 20 5 20 6 21 6 20 6 22 6 21 5 23 4 22 3 21 2 21 1 20 1 20 1 21 0 19 -2 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 18 -4 19 -4 19 -5 20 -6 19 -8 20 -9 19 -10 19 -10 18 -10 18 -10 21 -10 20 -10 19 -9 18 -10 18 -8 19 -9 19 -7 18 -7 19 -7 19 -7 19 -5 20 -5 20 -3 22 -3 22 -3 23 ]

I found this description about CSI info. in ESP32 documentation: The CSI data corresponding to each Long Training Field (LTF) type is stored in a buffer starting from the buf field. Each item is stored as two bytes: imaginary part followed by real part. And the first four bytes are invalid due to ESP32 hardware limitations . :shock:

In my mind, this CSi should be re-formed like this: [-1j+22, -1j+23, 0j + 21, ------, -3j + 23.]. However, I can see some very large values (22, 23, 21, etc.) but theoretically, CSI amplitude should be around or smaller than 1. Is the CSI data scaled accordingly (I set 'manu_scale' to False in 'wifi_csi_config_t')? :cry:

My query is do I parse the CSI data correctly?

Re: How to parse the received CSI data?

Posted: Fri Nov 04, 2022 4:31 am
by Songluu
Hello, I have encountered the same problem. How did you deal with it finally?

Re: How to parse the received CSI data?

Posted: Sun Nov 10, 2024 9:55 am
by sayid_ehd
Hi there,
I have found a way to get the Amplitude but not the phase. It's in the ESP-CSI repo https://github.com/espressif/esp-csi/bl ... d_parse.py
I tried to get the phase from the angle of each pair of data. But I don't think it's accurate, since it oscillates between Pi and -Pi no matter the environment.
If you have resolved the problem, please share your solution with us. Thanks :D

Re: How to parse the received CSI data?

Posted: Mon Nov 11, 2024 12:42 pm
by aliarifat794
You can use numpy for this purpose.