Open benjamin-kl opened 1 month ago
@benjamin-kl Actually, the CSI of the ESP32C6 differs from that of the ESP32C3. In the ESP32C6, the HT-LTF overrides the L-LTF, with a subcarrier index range of (-32 to -1, 0 to 32) and an effective subcarrier index range of (-28 to -1, 1 to 28). The current ESP32C6 documentation contains inaccuracies, but we will update it promptly.
@QingzhaoYin Thanks for taking a look at this. However I think this is not only an issue with the documentation, but there is a bug in the software.
If the subcarrier order is as you said it is, I would expect to see zero-values at the beginning and zero-values at the end of the CSI data. If you take a look at the CSI I provided (recorded with C6), the CSI values for the first four subcarriers are indeed zero. However, the last three are not.
Even worse, the C6 seems to occasionally report completely wrong CSI data. Three examples:
num values: 128 [0, 0, 0, 0, 0, 0, 0, 0, -3, 1, 0, 0, 8, -4, 7, -6, 4, -10, 2, -15, 0, -20, -1, -25, -1, -29, 0, -32, -1, -34, -1, -35, -1, -35, -1, -33, -2, -30, -1, -23, 0, -17, -1, -11, -2, -5, -2, 3, 0, 14, 1, 23, -2, 31, -5, 40, -6, 47, -7, 52, -7, 57, -4, 58, 0, 0, -5, 47, -5, 42, -5, 35, -5, 42, -5, 35, -1, -1, -1, 0, -4, 0, -2, 2, -1, 2, -1, 2, -2, 2, -2, 4, -3, 2, -3, 3, 1, 0, 4, -1, 2, 1, 0, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 3, 5, 2, 6, 3, -1, 13, 7, 0, 0, 0, 0, 0, 0]
num values: 128 [0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 2, 1, 10, 0, 6, -4, 2, -10, 0, -14, 3, -17, 3, -21, 3, -25, 4, -28, 6, -30, 8, -32, 8, -32, 6, -31, 3, -28, 1, -23, 2, -17, 3, -12, 1, -5, -1, 4, -4, 13, -7, 22, -11, 30, -13, 37, -15, 42, -17, 46, -20, 48, -22, 47, 0, 0, -22, 40, -19, 35, -17, 27, -19, 35, -17, 27, -25, -19, -24, -18, -25, -19, -24, -18, 91, -5, 83, -89, 36, -24, -17, -76, -71, -24, 59, 33, 114, -80, -83, -15, 113, 14, -50, -43, -44, -85, 2, 114, -41, 46, -54, 48, -46, -2, -15, -94, -53, 3, 60, 5, -127, -62, 46, -66, -103, -82, 66, 0]
num values: 128 [-119, 48, -65, 117, 118, 32, -27, -85, -56, 124, 41, 72, -90, -60, -8, -84, 113, 39, 45, -99, -11, -101, -95, 47, -122, 27, 90, -98, -31, -13, -73, -12, 69, -22, 63, 78, -93, 28, 81, 19, -33, 94, -12, -26, 36, -126, -23, 5, 59, -70, 88, 122, -91, 75, 20, 122, 42, 23, -45, 12, 63, 22, 59, -71, -44, 6, 83, 71, 63, 63, 66, 76, -106, 104, -106, 111, -53, -81, 69, 66, 57, -119, 102, 8, 0, 81, 87, -4, 69, 1, -86, -58, 99, -73, 57, 14, -73, 90, -94, 84, 82, -41, 91, 47, -19, -61, 16, -94, -42, -82, -94, -103, -50, 59, 47, -105, -66, -57, 19, 107, -22, -58, -66, -115, 0, -46, -81, -29]
All three samples were received from the same transmitter during a very short timeframe.
The first sample is as we expect. The second sample does not have zero-values at the end The third sample is completely malformed
@benjamin-kl Actually, invalid CSI data may be read in wifi_csi_rx_cb . The "rx_channel_estimate_info_vld" field in wifi_pkt_rx_ctrl_t indicates whether the channel information is valid. If you do not use this bit as a filter, it's possible to get the data as you provided.
Answers checklist.
IDF version.
v5.3
Espressif SoC revision.
ESP32-C6
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-C6-DevKitC-1
Power Supply used.
USB
What is the expected behavior?
Scenario: receiving a csi_rx_cb callback for a HT20 PPDU. Expected behavior: Receive 256 bytes in the wifi_csi_info_t buffer, which is 64 (subcarriers) 2 bytes (Im/Re) L-LTF CSI data + 64 (subcarriers) 2 bytes (Im/Re) HT-LTF CSI data. The order of the subcarriers is
0~31,-32~-1
in both cases, as described in the WiFi API guide (https://docs.espressif.com/projects/esp-idf/en/stable/esp32c6/api-guides/wifi.html#wi-fi-channel-state-information)What is the actual behavior?
Actual behavior (esp32s3 DevKitC-1U): same as expected behavior
Actual behavior (esp32): same as expected behavior
Actual behavior (esp32c6 DevKitC-1): Receive 128 bytes in the callback. L-LTF data is missing. The order of the subcarriers is different from what is described in the WiFi API guide (null subcarriers/guard band in front?)
Steps to reproduce.
Minimal reproducible example (receive):
Debug Logs.
More Information.
No response