Skip to content

Commit dc5807b

Browse files
committed
Merge branch 'Merge_csi_data_read_parse_files' into 'master'
Merge the csi_data_read_parse.py files from C5, C6, and S3C3 into a single unified script. See merge request esp-components/esp-csi-ext!60
2 parents 938b95e + ce46c4b commit dc5807b

File tree

8 files changed

+207
-10105
lines changed

8 files changed

+207
-10105
lines changed

examples/get-started/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Get Started Examples[[中文]](./README_cn.md)
1+
# Get Started Examples
2+
[[中文]](./README_cn.md)
23

34
This example demonstrates how to obtain CSI data through communication between two espressif chips, and uses a graphical interface to display real-time data of CSI subcarriers
45

@@ -31,7 +32,6 @@ You need to prepare two development boards for espressif chips, one as the sende
3132
```
3233

3334
2. Run `csi_data_read_parse.py` in `csi_recv` for data analysis. Please close `idf.py monitor` before running
34-
> Due to RF hardware upgrades in ESP32-C5 and ESP32-C6, the scripts `csi_data_read_parse_c5.py` and `csi_data_read_parse_c6.py` must be used for data analysis.
3535

3636
```shell
3737
cd esp-csi-gitlab/examples/get-started/tools

examples/get-started/README_cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Get Started Examples[[English]](./README.md)
1+
# Get Started Examples
2+
[[English]](./README.md)
23

34
本示例演示了如何通过两个 ESP32 芯片之间的通信获取 CSI 数据,并使用图形界面显示 CSI 子载波的实时数据。
45

@@ -33,7 +34,6 @@
3334
```
3435

3536
2. 在 `csi_recv` 里运行 `csi_data_read_parse.py` 做数据分析。 在运行前请关闭 `idf.py monitor`
36-
> esp32-c5 和 esp32-c6 由于射频硬件的升级,需要使用 `csi_data_read_parse_c5.py``csi_data_read_parse_c6.py` 做数据分析
3737

3838
```shell
3939
cd esp-csi-gitlab/examples/get-started/tools

examples/get-started/csi_recv/main/app_main.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,21 @@
2323
#define CONFIG_LESS_INTERFERENCE_CHANNEL 11
2424
#if CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C6
2525
#define CONFIG_WIFI_BAND_MODE WIFI_BAND_MODE_2G_ONLY
26-
#define CONFIG_WIFI_2G_BANDWIDTHS WIFI_BW_HT40
27-
#define CONFIG_WIFI_5G_BANDWIDTHS WIFI_BW_HT40
26+
#define CONFIG_WIFI_2G_BANDWIDTHS WIFI_BW_HT20
27+
#define CONFIG_WIFI_5G_BANDWIDTHS WIFI_BW_HT20
2828
#define CONFIG_WIFI_2G_PROTOCOL WIFI_PROTOCOL_11N
2929
#define CONFIG_WIFI_5G_PROTOCOL WIFI_PROTOCOL_11N
30-
#define CONFIG_ESP_NOW_PHYMODE WIFI_PHY_MODE_HT40
30+
#define CONFIG_ESP_NOW_PHYMODE WIFI_PHY_MODE_HT20
3131
#else
3232
#define CONFIG_WIFI_BANDWIDTH WIFI_BW_HT40
3333
#endif
3434
#define CONFIG_ESP_NOW_RATE WIFI_PHY_RATE_MCS0_LGI
35-
#define CONFIG_FORCE_GAIN 0
36-
#define CSI_FORCE_LLTF 0
35+
#define CONFIG_FORCE_GAIN 1
36+
#if CONFIG_IDF_TARGET_ESP32C5
37+
#define CSI_FORCE_LLTF 0
38+
#endif
3739
#if CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C6
38-
#define CONFIG_GAIN_CONTROL 1
40+
#define CONFIG_GAIN_CONTROL 1
3941
#endif
4042

4143
static const uint8_t CONFIG_CSI_SEND_MAC[] = {0x1a, 0x00, 0x00, 0x00, 0x00, 0x00};
@@ -115,8 +117,6 @@ static void wifi_init()
115117
ESP_ERROR_CHECK(esp_wifi_set_bandwidth(ESP_IF_WIFI_STA, CONFIG_WIFI_BANDWIDTH));
116118
ESP_ERROR_CHECK(esp_wifi_start());
117119
#endif
118-
wifi_bandwidth_t bandwidth1;
119-
esp_wifi_get_bandwidth(WIFI_IF_STA, &bandwidth1);
120120

121121
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3
122122
ESP_ERROR_CHECK(esp_wifi_config_espnow_rate(ESP_IF_WIFI_STA, CONFIG_ESP_NOW_RATE));

examples/get-started/csi_send/main/app_main.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,17 @@
2323

2424
#if CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C6
2525
#define CONFIG_WIFI_BAND_MODE WIFI_BAND_MODE_2G_ONLY
26-
#define CONFIG_WIFI_2G_BANDWIDTHS WIFI_BW_HT40
27-
#define CONFIG_WIFI_5G_BANDWIDTHS WIFI_BW_HT40
26+
#define CONFIG_WIFI_2G_BANDWIDTHS WIFI_BW_HT20
27+
#define CONFIG_WIFI_5G_BANDWIDTHS WIFI_BW_HT20
2828
#define CONFIG_WIFI_2G_PROTOCOL WIFI_PROTOCOL_11N
2929
#define CONFIG_WIFI_5G_PROTOCOL WIFI_PROTOCOL_11N
30+
#define CONFIG_ESP_NOW_PHYMODE WIFI_PHY_MODE_HT20
3031
#else
3132
#define CONFIG_WIFI_BANDWIDTH WIFI_BW_HT40
3233
#endif
3334

34-
#if CONFIG_IDF_TARGET_ESP32C5 || CONFIG_IDF_TARGET_ESP32C6
35-
#define CONFIG_ESP_NOW_PHYMODE WIFI_PHY_MODE_HT40
36-
#endif
3735
#define CONFIG_ESP_NOW_RATE WIFI_PHY_RATE_MCS0_LGI
38-
#define CONFIG_SEND_FREQUENCY 10
36+
#define CONFIG_SEND_FREQUENCY 20
3937

4038
static const uint8_t CONFIG_CSI_SEND_MAC[] = {0x1a, 0x00, 0x00, 0x00, 0x00, 0x00};
4139
static const char *TAG = "csi_send";

examples/get-started/tools/csi_data.csv

Lines changed: 0 additions & 9358 deletions
This file was deleted.

0 commit comments

Comments
 (0)