espressif / esp-csi

Applications based on Wi-Fi CSI (Channel state information), such as indoor positioning, human detection
Apache License 2.0
681 stars 105 forks source link

csi_data-read_parse error (AEGHB-722) #186

Open xlwan1132 opened 2 months ago

xlwan1132 commented 2 months ago

`` if len(csi_data) != len(DATA_COLUMNS_NAMES): print("element number is not equal") continue

try: csi_raw_data = json.loads(csi_data[-1]) except json.JSONDecodeError: print(f"data is incomplete") continue

if len(csi_raw_data) != 128 and len(csi_raw_data) != 256 and len(csi_raw_data) != 384: print(f"element number is not equal: {len(csi_raw_data)}") continue `` What is the reason for these errors when I use csi_data-read_parse for data collection?

suhipek commented 2 months ago

Thank you for reporting this issue. It seems like the CSI data is corrupted when transferring on the serial.

To help us investigate:

  1. Which development board / serial-to-USB chip are you using?
  2. Have you checked the serial output with idf.py monitor?
  3. Do you see corrupted packets in the serial output?

Please provide a dump of your serial output if possible. Any additional details on how to reproduce the error would be helpful.

xlwan1132 commented 2 months ago

1.I am using the ESP32 S3 development board 2.sorry,I don't know if you want me to monitor sending or receiving COM?

suhipek commented 2 months ago

1.I am using the ESP32 S3 development board 2.sorry,I don't know if you want me to monitor sending or receiving COM?

You should monitor the receiver - that's where the csi_data_read_parse.py script grabs the CSI data from.

I've added some print statements to show the packet content when it spots a corrupted packet. With those print statements you can check corrupted packets directly through console. Check out the updated csi_data_read_parse.py here: https://gist.github.com/suhipek/4f65fc797844b24ded20c8be0ab45162

BTW, have you changed any parameters in the sender, receiver, or parser programs?

xlwan1132 commented 2 months ago

error.txt

xlwan1132 commented 1 month ago

@suhipek

MacChu0315-Espressif commented 1 month ago

This is a strange phenomenon. If you look at the log you gave, there are many pieces of data that are broken. Have you ever tried to change the code? At the same time, do you have any external equipment attached to your development board, and have you tried to replace a development board and cable for comparison testing to eliminate hardware interference?

xlwan1132 commented 1 month ago

1.I cloned the esp-csi code again, but this error still occurs 2.There are no other devices connected to my development board 3.I used another set of development boards for sending and receiving,but this error still occurs