├── _components ├── component.mk ├── README.md ├── nvs_component.h ├── input_component.h ├── time_component.h ├── sockets_component.h ├── sd_component.h └── csi_component.h ├── .gitignore ├── udp_client ├── sdkconfig.ci ├── main │ ├── CMakeLists.txt │ ├── component.mk │ ├── Kconfig.projbuild │ └── udp_client.c ├── .vscode │ ├── settings.json │ ├── launch.json │ ├── c_cpp_properties.json │ └── tasks.json ├── Makefile ├── CMakeLists.txt ├── README.md └── example_test.py ├── demo-img.png ├── active_ap ├── main │ ├── CMakeLists.txt │ ├── component.mk │ ├── Kconfig.projbuild │ └── main.c ├── Makefile ├── CMakeLists.txt ├── test_new.py ├── .vscode │ ├── c_cpp_properties.json │ └── settings.json ├── README.md ├── test_pyqt.py ├── camera_streaming.py ├── test_dock.py ├── host_processing_csi.py ├── host_processing_pyqt.py ├── sdkconfig └── sdkconfig.old ├── active_client ├── main │ ├── CMakeLists.txt │ ├── component.mk │ ├── Kconfig.projbuild │ └── main.c ├── Makefile ├── CMakeLists.txt └── .vscode │ ├── c_cpp_properties.json │ └── settings.json ├── LICENSE └── README.md /_components/component.mk: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .DS_Store -------------------------------------------------------------------------------- /udp_client/sdkconfig.ci: -------------------------------------------------------------------------------- 1 | CONFIG_EXAMPLE_SOCKET_IP_INPUT_STDIN=y -------------------------------------------------------------------------------- /demo-img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Rui-Chun/ESP32-CSI-Collection-and-Display/HEAD/demo-img.png -------------------------------------------------------------------------------- /udp_client/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "udp_client.c" 2 | INCLUDE_DIRS ".") -------------------------------------------------------------------------------- /active_ap/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(COMPONENT_SRCS "main.c") 2 | set(COMPONENT_ADD_INCLUDEDIRS ".") 3 | 4 | register_component() -------------------------------------------------------------------------------- /active_client/main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(COMPONENT_SRCS "main.c") 2 | set(COMPONENT_ADD_INCLUDEDIRS ".") 3 | 4 | register_component() -------------------------------------------------------------------------------- /_components/README.md: -------------------------------------------------------------------------------- 1 | ## Global Components for each ESP32 Sub-project 2 | 3 | The files in this directory allow us to create reusable components for use in all of the esp-idf sub-projects. -------------------------------------------------------------------------------- /udp_client/main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | -------------------------------------------------------------------------------- /active_ap/main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | COMPONENT_ADD_INCLUDEDIRS += ../../_components 6 | -------------------------------------------------------------------------------- /active_client/main/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # "main" pseudo-component makefile. 3 | # 4 | # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) 5 | COMPONENT_ADD_INCLUDEDIRS += ../../_components 6 | -------------------------------------------------------------------------------- /active_ap/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := active-ap 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | 10 | -------------------------------------------------------------------------------- /active_client/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := active-client 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | 10 | -------------------------------------------------------------------------------- /active_ap/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 6 | project(active-ap) -------------------------------------------------------------------------------- /active_client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 6 | project(active-ap) -------------------------------------------------------------------------------- /udp_client/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "C_Cpp.intelliSenseEngine": "Tag Parser", 3 | "idf.port": "/dev/cu.usbserial-14220", 4 | "idf.flashType": "UART", 5 | "files.associations": { 6 | "*.ipp": "c", 7 | "sockets.h": "c", 8 | "cerrno": "c" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /active_ap/test_new.py: -------------------------------------------------------------------------------- 1 | import pyqtgraph as pg 2 | import numpy as np 3 | x = np.arange(1000) 4 | y = np.random.normal(size=(3, 1000)) 5 | plotWidget = pg.plot(title="Three plot curves") 6 | for i in range(3): 7 | plotWidget.plot(x, y[i], pen=(i,3)) ## setting pen=(i,3) automaticaly creates three different-colored pens 8 | 9 | -------------------------------------------------------------------------------- /udp_client/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # This is a project Makefile. It is assumed the directory this Makefile resides in is a 3 | # project subdirectory. 4 | # 5 | 6 | PROJECT_NAME := udp_client 7 | 8 | EXTRA_COMPONENT_DIRS = $(IDF_PATH)/examples/common_components/protocol_examples_common 9 | 10 | include $(IDF_PATH)/make/project.mk 11 | 12 | -------------------------------------------------------------------------------- /udp_client/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "espidf", 9 | "name": "Launch", 10 | "request": "launch", 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /_components/nvs_component.h: -------------------------------------------------------------------------------- 1 | #ifndef ESP32_CSI_NVS_COMPONENT_H 2 | #define ESP32_CSI_NVS_COMPONENT_H 3 | 4 | #include "nvs_flash.h" 5 | 6 | void nvs_init() { 7 | //Initialize NVS 8 | esp_err_t ret = nvs_flash_init(); 9 | if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { 10 | ESP_ERROR_CHECK(nvs_flash_erase()); 11 | ret = nvs_flash_init(); 12 | } 13 | ESP_ERROR_CHECK(ret); 14 | } 15 | 16 | #endif //ESP32_CSI_NVS_COMPONENT_H 17 | -------------------------------------------------------------------------------- /udp_client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following five lines of boilerplate have to be in your project's 2 | # CMakeLists in this exact order for cmake to work correctly 3 | cmake_minimum_required(VERSION 3.5) 4 | 5 | # (Not part of the boilerplate) 6 | # This example uses an extra component for common functions such as Wi-Fi and Ethernet connection. 7 | set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common) 8 | 9 | include($ENV{IDF_PATH}/tools/cmake/project.cmake) 10 | project(udp_client) 11 | -------------------------------------------------------------------------------- /active_ap/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Mac", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "macFrameworkPath": [], 10 | "compilerPath": "/usr/local/bin/gcc-9", 11 | "cStandard": "gnu17", 12 | "cppStandard": "gnu++14", 13 | "intelliSenseMode": "macos-gcc-x64", 14 | "compileCommands": "${workspaceFolder}/build/compile_commands.json" 15 | } 16 | ], 17 | "version": 4 18 | } -------------------------------------------------------------------------------- /active_client/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Mac", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "macFrameworkPath": [], 10 | "compilerPath": "/usr/local/bin/gcc-9", 11 | "cStandard": "gnu17", 12 | "cppStandard": "gnu++14", 13 | "intelliSenseMode": "macos-gcc-x64", 14 | "compileCommands": "${workspaceFolder}/build/compile_commands.json" 15 | } 16 | ], 17 | "version": 4 18 | } -------------------------------------------------------------------------------- /active_ap/README.md: -------------------------------------------------------------------------------- 1 | # Active CSI collection (AP) 2 | 3 | To use openocd to debug through JTAG, we would need jumpers on pins ... 4 | 5 | This sub-project most commonly pairs with the project in `./active_sta`. Flash these two sub-projects to two different ESP32s to quickly begin collecting Channel State Information. 6 | 7 | Improvements: 8 | 9 | 1. use a separate task to handel data. 10 | 2. send back using udp instead of sd card. 11 | 12 | Steps: 13 | 14 | 1. turn on soft ap 15 | 2. connect host computer to soft-ap, dhcp should work. 16 | This has to be done first to set up routing, otherwise, the ap does not know where to send the data and crashes. 17 | 3. set up all the stations. -------------------------------------------------------------------------------- /active_ap/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "idf.flashType": "UART", 3 | "idf.port": "/dev/cu.usbserial-142320", 4 | "files.associations": { 5 | "sockets_component.h": "c", 6 | "input_component.h": "c", 7 | "time_component.h": "c", 8 | "*.ipp": "cpp", 9 | "cstring": "cpp" 10 | }, 11 | "idf.adapterTargetName": "esp32", 12 | "idf.openOcdConfigs": [ 13 | "interface/ftdi/esp32_devkitj_v1.cfg", 14 | "target/esp32.cfg" 15 | ], 16 | "idf.customExtraPaths": "/Users/ruichun/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin:/Users/ruichun/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin:/Users/ruichun/.espressif/tools/esp32ulp-elf/2.28.51-esp-20191205/esp32ulp-elf-binutils/bin:/Users/ruichun/.espressif/tools/esp32s2ulp-elf/2.28.51-esp-20191205/esp32s2ulp-elf-binutils/bin:/Users/ruichun/.espressif/tools/openocd-esp32/v0.10.0-esp32-20210401/openocd-esp32/bin" 17 | } -------------------------------------------------------------------------------- /active_client/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "idf.flashType": "UART", 3 | "idf.port": "/dev/cu.usbserial-142310", 4 | "files.associations": { 5 | "sockets_component.h": "c", 6 | "input_component.h": "c", 7 | "time_component.h": "c", 8 | "*.ipp": "cpp", 9 | "cstring": "cpp", 10 | "ping_sock.h": "c" 11 | }, 12 | "idf.adapterTargetName": "esp32", 13 | "idf.openOcdConfigs": [ 14 | "interface/ftdi/esp32_devkitj_v1.cfg", 15 | "target/esp32.cfg" 16 | ], 17 | "idf.customExtraPaths": "/Users/ruichun/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin:/Users/ruichun/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin:/Users/ruichun/.espressif/tools/esp32ulp-elf/2.28.51-esp-20191205/esp32ulp-elf-binutils/bin:/Users/ruichun/.espressif/tools/esp32s2ulp-elf/2.28.51-esp-20191205/esp32s2ulp-elf-binutils/bin:/Users/ruichun/.espressif/tools/openocd-esp32/v0.10.0-esp32-20210401/openocd-esp32/bin" 18 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [2021] [Ruichun Ma] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /_components/input_component.h: -------------------------------------------------------------------------------- 1 | #ifndef ESP32_CSI_INPUT_COMPONENT_H 2 | #define ESP32_CSI_INPUT_COMPONENT_H 3 | 4 | #include "csi_component.h" 5 | 6 | char input_buffer[256]; 7 | int input_buffer_pointer = 0; 8 | 9 | void _handle_input() { 10 | if (match_set_timestamp_template(input_buffer)) { 11 | printf("Setting local time to %s\n", input_buffer); 12 | time_set(input_buffer); 13 | } else { 14 | printf("Unable to handle input %s\n", input_buffer); 15 | } 16 | } 17 | 18 | void input_check() { 19 | uint8_t ch = fgetc(stdin); 20 | 21 | while (ch != 0xFF) { 22 | if (ch == '\n') { 23 | _handle_input(); 24 | input_buffer[0] = '\0'; 25 | input_buffer_pointer = 0; 26 | } else { 27 | input_buffer[input_buffer_pointer] = ch; 28 | input_buffer[input_buffer_pointer + 1] = '\0'; 29 | input_buffer_pointer++; 30 | } 31 | 32 | ch = fgetc(stdin); 33 | } 34 | } 35 | 36 | void input_loop() { 37 | while (true) { 38 | input_check(); 39 | vTaskDelay(10 / portTICK_PERIOD_MS); 40 | } 41 | } 42 | 43 | #endif //ESP32_CSI_INPUT_COMPONENT_H 44 | -------------------------------------------------------------------------------- /udp_client/.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "ESP-IDF", 5 | "compilerPath": "/Users/ruichun/.espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc", 6 | "cStandard": "c11", 7 | "cppStandard": "c++17", 8 | "includePath": [ 9 | "${config:idf.espIdfPath}/components/**", 10 | "${config:idf.espIdfPathWin}/components/**", 11 | "${config:idf.espAdfPath}/components/**", 12 | "${config:idf.espAdfPathWin}/components/**", 13 | "${workspaceFolder}/**" 14 | ], 15 | "browse": { 16 | "path": [ 17 | "${config:idf.espIdfPath}/components", 18 | "${config:idf.espIdfPathWin}/components", 19 | "${config:idf.espAdfPath}/components/**", 20 | "${config:idf.espAdfPathWin}/components/**", 21 | "${workspaceFolder}" 22 | ], 23 | "limitSymbolsToIncludedHeaders": false 24 | } 25 | } 26 | ], 27 | "version": 4 28 | } 29 | -------------------------------------------------------------------------------- /active_ap/main/Kconfig.projbuild: -------------------------------------------------------------------------------- 1 | menu "ESP32 CSI Tool Config" 2 | 3 | config ESP_WIFI_SSID 4 | string "WiFi SSID" 5 | default "myssid" 6 | help 7 | SSID (network name) for the example to connect to. 8 | 9 | config ESP_WIFI_PASSWORD 10 | string "WiFi Password" 11 | default "mypassword" 12 | help 13 | WiFi password (WPA or WPA2) for the example to use. 14 | 15 | config SHOULD_COLLECT_CSI 16 | bool "Should this ESP32 collect and print CSI data?" 17 | default "y" 18 | help 19 | Allowing only a single ESP32 to collect CSI will likely increase the sampling frequency of your experiments. 20 | 21 | config SEND_CSI_TO_SERIAL 22 | bool "Send CSI data to Serial" 23 | default "y" 24 | help 25 | Sending data through serial (to a computer) can take time and buffer space. 26 | If you are storing to an SD card, it may be useful to deselect this option. 27 | 28 | config SEND_CSI_TO_SD 29 | bool "Send CSI data to SD" 30 | default "y" 31 | help 32 | Sending data to an SD card can take time and buffer space. 33 | If your ESP32 does not have an SD card, there is no reason to keep this behaviour. 34 | If you do though, the program will be recognize this and not attempt writing to the SD card. 35 | endmenu 36 | -------------------------------------------------------------------------------- /active_client/main/Kconfig.projbuild: -------------------------------------------------------------------------------- 1 | menu "ESP32 CSI Tool Config" 2 | 3 | config ESP_WIFI_SSID 4 | string "WiFi SSID" 5 | default "myssid" 6 | help 7 | SSID (network name) for the example to connect to. 8 | 9 | config ESP_WIFI_PASSWORD 10 | string "WiFi Password" 11 | default "mypassword" 12 | help 13 | WiFi password (WPA or WPA2) for the example to use. 14 | 15 | config SHOULD_COLLECT_CSI 16 | bool "Should this ESP32 collect and print CSI data?" 17 | default "y" 18 | help 19 | Allowing only a single ESP32 to collect CSI will likely increase the sampling frequency of your experiments. 20 | 21 | config SEND_CSI_TO_SERIAL 22 | bool "Send CSI data to Serial" 23 | default "y" 24 | help 25 | Sending data through serial (to a computer) can take time and buffer space. 26 | If you are storing to an SD card, it may be useful to deselect this option. 27 | 28 | config SEND_CSI_TO_SD 29 | bool "Send CSI data to SD" 30 | default "y" 31 | help 32 | Sending data to an SD card can take time and buffer space. 33 | If your ESP32 does not have an SD card, there is no reason to keep this behaviour. 34 | If you do though, the program will be recognize this and not attempt writing to the SD card. 35 | endmenu 36 | -------------------------------------------------------------------------------- /_components/time_component.h: -------------------------------------------------------------------------------- 1 | #ifndef ESP32_CSI_TIME_COMPONENT_H 2 | #define ESP32_CSI_TIME_COMPONENT_H 3 | 4 | static char *SET_TIMESTAMP_SIMPLE_TEMPLATE = "%li.%li"; 5 | static char *SET_TIMESTAMP_TEMPLATE = "SETTIME: %li.%li"; 6 | 7 | bool real_time_set = false; 8 | 9 | bool match_set_timestamp_template(char *candidate_string) { 10 | long int tv_sec; 11 | long int tv_usec; 12 | return sscanf(candidate_string, SET_TIMESTAMP_TEMPLATE, &tv_sec, &tv_usec) > 0; 13 | } 14 | 15 | void time_set(char *timestamp_string) { 16 | long int tv_sec; 17 | long int tv_usec; 18 | 19 | int res = sscanf(timestamp_string, SET_TIMESTAMP_TEMPLATE, &tv_sec, &tv_usec); 20 | if (res <= 0) { 21 | res = sscanf(timestamp_string, SET_TIMESTAMP_SIMPLE_TEMPLATE, &tv_sec, &tv_usec); 22 | } 23 | 24 | if (res > 0) { 25 | struct timeval now = {.tv_sec = tv_sec, .tv_usec = tv_usec}; 26 | settimeofday(&now, NULL); 27 | real_time_set = true; 28 | } 29 | } 30 | 31 | char *time_string_get() { 32 | struct timeval currentTimeGot; 33 | gettimeofday(¤tTimeGot, NULL); 34 | ssize_t resp_size = snprintf(NULL, 0, "%li.%li", currentTimeGot.tv_sec, currentTimeGot.tv_usec); 35 | char *resp = malloc(resp_size + 1); 36 | snprintf(resp, resp_size + 1, "%li.%li", currentTimeGot.tv_sec, currentTimeGot.tv_usec); 37 | return resp; 38 | } 39 | 40 | #endif //ESP32_CSI_TIME_COMPONENT_H 41 | -------------------------------------------------------------------------------- /udp_client/main/Kconfig.projbuild: -------------------------------------------------------------------------------- 1 | menu "Example Configuration" 2 | 3 | choice EXAMPLE_IP_MODE 4 | prompt "IP Version" 5 | depends on EXAMPLE_SOCKET_IP_INPUT_STRING 6 | help 7 | Example can use either IPV4 or IPV6. 8 | 9 | config EXAMPLE_IPV4 10 | bool "IPV4" 11 | 12 | config EXAMPLE_IPV6 13 | bool "IPV6" 14 | select EXAMPLE_CONNECT_IPV6 15 | 16 | endchoice 17 | 18 | config EXAMPLE_IPV4_ADDR 19 | string "IPV4 Address" 20 | default "192.168.0.165" 21 | depends on EXAMPLE_IPV4 22 | help 23 | IPV4 address to which the client example will send data. 24 | 25 | config EXAMPLE_IPV6_ADDR 26 | string "IPV6 Address" 27 | default "FE80::30AD:E57B:C212:68AD" 28 | depends on EXAMPLE_IPV6 29 | help 30 | IPV6 address to which the client example will send data. 31 | 32 | config EXAMPLE_PORT 33 | int "Port" 34 | range 0 65535 35 | default 3333 36 | help 37 | The remote port to which the client example will send data. 38 | 39 | choice EXAMPLE_SOCKET_IP_INPUT 40 | prompt "Socket example source" 41 | default EXAMPLE_SOCKET_IP_INPUT_STRING 42 | help 43 | Selects the input source of the IP used in the example. 44 | 45 | config EXAMPLE_SOCKET_IP_INPUT_STRING 46 | bool "From string" 47 | 48 | config EXAMPLE_SOCKET_IP_INPUT_STDIN 49 | bool "From stdin" 50 | endchoice 51 | 52 | endmenu 53 | -------------------------------------------------------------------------------- /_components/sockets_component.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "freertos/event_groups.h" 11 | #include "freertos/task.h" 12 | #include "esp_system.h" 13 | #include "esp_wifi.h" 14 | #include "esp_event_loop.h" 15 | #include 16 | #include "rom/ets_sys.h" 17 | 18 | #define CONFIG_PACKET_RATE 350 19 | 20 | char *data = "1\n"; 21 | 22 | void socket_transmitter_sta_loop(bool (*is_wifi_connected)()) { 23 | int socket_fd = -1; 24 | while (1) { 25 | close(socket_fd); 26 | char *ip = "192.168.4.1"; 27 | struct sockaddr_in caddr; 28 | caddr.sin_family = AF_INET; 29 | caddr.sin_port = htons(2223); 30 | while (!is_wifi_connected()) { 31 | // wait until connected to AP 32 | printf("waiting\n"); 33 | vTaskDelay(1000 / portTICK_PERIOD_MS); 34 | } 35 | if (inet_aton(ip, &caddr.sin_addr) == 0) { 36 | printf("ERROR: inet_aton\n"); 37 | continue; 38 | } 39 | 40 | socket_fd = socket(PF_INET, SOCK_DGRAM, 0); 41 | if (socket_fd == -1) { 42 | printf("ERROR: Socket creation error [%s]\n", strerror(errno)); 43 | continue; 44 | } 45 | if (connect(socket_fd, (const struct sockaddr *) &caddr, sizeof(struct sockaddr)) == -1) { 46 | printf("ERROR: socket connection error [%s]\n", strerror(errno)); 47 | continue; 48 | } 49 | 50 | while (1) { 51 | if (!is_wifi_connected()) { 52 | printf("ERROR: wifi is not connected\n"); 53 | break; 54 | } 55 | 56 | if (sendto(socket_fd, &data, strlen(data), 0, (const struct sockaddr *) &caddr, sizeof(caddr)) != 57 | strlen(data)) { 58 | vTaskDelay(1); 59 | continue; 60 | } 61 | vTaskDelay(2); 62 | 63 | #ifdef CONFIG_PACKET_RATE 64 | vTaskDelay(CONFIG_PACKET_RATE != 0 ? floor(1000 / CONFIG_PACKET_RATE) : 0); 65 | ets_delay_us(((1000.0 / CONFIG_PACKET_RATE) - floor(1000 / CONFIG_PACKET_RATE)) * 1000); 66 | #else 67 | vTaskDelay(10); // This limits TX to approximately 100 per second. 68 | #endif 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /active_ap/test_pyqt.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Demonstrates use of PlotWidget class. This is little more than a 4 | GraphicsView with a PlotItem placed in its center. 5 | """ 6 | 7 | from pyqtgraph.Qt import QtGui, QtCore 8 | import numpy as np 9 | import pyqtgraph as pg 10 | 11 | app = pg.mkQApp() 12 | mw = QtGui.QMainWindow() 13 | mw.setWindowTitle('pyqtgraph example: PlotWidget') 14 | mw.resize(800,800) 15 | cw = QtGui.QWidget() 16 | mw.setCentralWidget(cw) 17 | l = QtGui.QVBoxLayout() 18 | cw.setLayout(l) 19 | 20 | pw = pg.PlotWidget(name='Plot1') ## giving the plots names allows us to link their axes together 21 | l.addWidget(pw) 22 | pw2 = pg.PlotWidget(name='Plot2') 23 | l.addWidget(pw2) 24 | pw3 = pg.PlotWidget() 25 | l.addWidget(pw3) 26 | 27 | mw.show() 28 | 29 | ## Create an empty plot curve to be filled later, set its pen 30 | p1 = pw.plot() 31 | p1.setPen((200,200,100)) 32 | 33 | ## Add in some extra graphics 34 | rect = QtGui.QGraphicsRectItem(QtCore.QRectF(0, 0, 1, 5e-11)) 35 | rect.setPen(pg.mkPen(100, 200, 100)) 36 | pw.addItem(rect) 37 | 38 | pw.setLabel('left', 'Value', units='V') 39 | pw.setLabel('bottom', 'Time', units='s') 40 | pw.setXRange(0, 2) 41 | pw.setYRange(0, 1e-10) 42 | 43 | def rand(n): 44 | data = np.random.random(n) 45 | data[int(n*0.1):int(n*0.13)] += .5 46 | data[int(n*0.18)] += 2 47 | data[int(n*0.1):int(n*0.13)] *= 5 48 | data[int(n*0.18)] *= 20 49 | data *= 1e-12 50 | return data, np.arange(n, n+len(data)) / float(n) 51 | 52 | 53 | def updateData(): 54 | yd, xd = rand(10000) 55 | p1.setData(y=yd, x=xd) 56 | 57 | ## Start a timer to rapidly update the plot in pw 58 | t = QtCore.QTimer() 59 | t.timeout.connect(updateData) 60 | t.start(50) 61 | #updateData() 62 | 63 | ## Multiple parameterized plots--we can autogenerate averages for these. 64 | for i in range(0, 5): 65 | for j in range(0, 3): 66 | yd, xd = rand(10000) 67 | pw2.plot(y=yd*(j+1), x=xd, params={'iter': i, 'val': j}) 68 | 69 | ## Test large numbers 70 | curve = pw3.plot(np.random.normal(size=100)*1e0, clickable=True) 71 | curve.curve.setClickable(True) 72 | curve.setPen('w') ## white pen 73 | curve.setShadowPen(pg.mkPen((70,70,30), width=6, cosmetic=True)) 74 | 75 | def clicked(): 76 | print("curve clicked") 77 | curve.sigClicked.connect(clicked) 78 | 79 | lr = pg.LinearRegionItem([1, 30], bounds=[0,100], movable=True) 80 | pw3.addItem(lr) 81 | line = pg.InfiniteLine(angle=90, movable=True) 82 | pw3.addItem(line) 83 | line.setBounds([0,200]) 84 | 85 | if __name__ == '__main__': 86 | pg.mkQApp().exec_() 87 | -------------------------------------------------------------------------------- /udp_client/README.md: -------------------------------------------------------------------------------- 1 | 2 | # UDP Client example 3 | 4 | (See the README.md file in the upper level 'examples' directory for more information about examples.) 5 | 6 | The application creates UDP socket and sends message to the predefined port and IP address. After the server's reply, the application prints received reply as ASCII text, waits for 2 seconds and sends another message. 7 | 8 | ## How to use example 9 | 10 | In order to create UDP server that communicates with UDP Client example, choose one of the following options. 11 | 12 | There are many host-side tools which can be used to interact with the UDP/TCP server/client. 13 | One command line tool is [netcat](http://netcat.sourceforge.net) which can send and receive many kinds of packets. 14 | Note: please replace `192.168.0.167 3333` with desired IPV4/IPV6 address (displayed in monitor console) and port number in the following commands. 15 | 16 | In addition to those tools, simple Python scripts can be found under sockets/scripts directory. Every script is designed to interact with one of the examples. 17 | 18 | ### Send UDP packet via netcat 19 | ``` 20 | echo "Hello from PC" | nc -w1 -u 192.168.0.167 3333 21 | ``` 22 | 23 | ### Receive UDP packet via netcat 24 | ``` 25 | echo "Hello from PC" | nc -w1 -u 192.168.0.167 3333 26 | ``` 27 | 28 | ### UDP server using netcat 29 | ``` 30 | nc -u -l 192.168.0.167 3333 31 | ``` 32 | 33 | ### Python scripts 34 | Script example_test.py could be used as a counter part to the udp-client application, ip protocol name (IPv4 or IPv6) shall be stated as argument. Example: 35 | 36 | ``` 37 | python example_test.py IPv4 38 | ``` 39 | Note that this script is used in automated tests, as well, so the IDF test framework packages need to be imported; 40 | please add `$IDF_PATH/tools/ci/python_packages` to `PYTHONPATH`. 41 | 42 | 43 | ## Hardware Required 44 | 45 | This example can be run on any commonly available ESP32 development board. 46 | 47 | ## Configure the project 48 | 49 | ``` 50 | idf.py menuconfig 51 | ``` 52 | 53 | Set following parameters under Example Configuration Options: 54 | 55 | * Set `IP version` of example to be IPV4 or IPV6. 56 | 57 | * Set `IPV4 Address` in case your chose IP version IPV4 above. 58 | 59 | * Set `IPV6 Address` in case your chose IP version IPV6 above. 60 | 61 | * Set `Port` number that represents remote port the example will send data and receive data from. 62 | 63 | Configure Wi-Fi or Ethernet under "Example Connection Configuration" menu. See "Establishing Wi-Fi or Ethernet Connection" section in [examples/protocols/README.md](../../README.md) for more details. 64 | 65 | 66 | ## Build and Flash 67 | 68 | Build the project and flash it to the board, then run monitor tool to view serial output: 69 | 70 | ``` 71 | idf.py -p PORT flash monitor 72 | ``` 73 | 74 | (To exit the serial monitor, type ``Ctrl-]``.) 75 | 76 | See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects. 77 | 78 | 79 | ## Troubleshooting 80 | 81 | Start server first, to receive data sent from the client (application). 82 | -------------------------------------------------------------------------------- /_components/sd_component.h: -------------------------------------------------------------------------------- 1 | #ifndef ESP32_CSI_SD_COMPONENT_H 2 | #define ESP32_CSI_SD_COMPONENT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "esp_err.h" 9 | #include "esp_log.h" 10 | #include "esp_vfs_fat.h" 11 | #include "driver/sdmmc_host.h" 12 | #include "driver/sdspi_host.h" 13 | #include "sdmmc_cmd.h" 14 | 15 | #define PIN_NUM_MISO 2 16 | #define PIN_NUM_MOSI 15 17 | #define PIN_NUM_CLK 14 18 | #define PIN_NUM_CS 13 19 | 20 | FILE *f; 21 | char filename[24] = {0}; 22 | 23 | void _sd_pick_next_file() { 24 | int i = -1; 25 | struct stat st; 26 | while (true) { 27 | i++; 28 | printf("Checking %i.csv\n", i); 29 | sprintf(filename, "/sdcard/%i.csv", i); 30 | 31 | if (stat(filename, &st) != 0) { 32 | break; 33 | } 34 | 35 | printf("File size: %li\n", st.st_size); 36 | } 37 | } 38 | 39 | void sd_init() { 40 | #ifdef CONFIG_SEND_CSI_TO_SD 41 | sdmmc_host_t host = SDSPI_HOST_DEFAULT(); 42 | sdspi_slot_config_t slot_config = SDSPI_SLOT_CONFIG_DEFAULT(); 43 | slot_config.gpio_miso = PIN_NUM_MISO; 44 | slot_config.gpio_mosi = PIN_NUM_MOSI; 45 | slot_config.gpio_sck = PIN_NUM_CLK; 46 | slot_config.gpio_cs = PIN_NUM_CS; 47 | 48 | esp_vfs_fat_sdmmc_mount_config_t mount_config = { 49 | .format_if_mount_failed = false, 50 | .max_files = 1, 51 | .allocation_unit_size = 16 * 1024 52 | }; 53 | 54 | sdmmc_card_t *card; 55 | esp_err_t ret = esp_vfs_fat_sdmmc_mount("/sdcard", &host, &slot_config, &mount_config, &card); 56 | 57 | if (ret != ESP_OK) { 58 | if (ret == ESP_FAIL) { 59 | ESP_LOGE("sd.h", 60 | "Failed to mount filesystem. " 61 | " If you want the card to be formatted, set format_if_mount_failed = true." 62 | ); 63 | } else { 64 | ESP_LOGE("sd.h", 65 | "Failed to initialize the card (%s). " 66 | " If you do not have an SD card attached, please ignore this message." 67 | " Make sure SD card lines have pull-up resistors in place.", esp_err_to_name(ret)); 68 | } 69 | return; 70 | } else { 71 | sdmmc_card_print_info(stdout, card); 72 | 73 | _sd_pick_next_file(); 74 | f = fopen(filename, "a"); 75 | } 76 | #endif 77 | } 78 | 79 | /* 80 | * Printf for both serial AND sd card (if available and configured) 81 | */ 82 | void outprintf(const char *format, ...) { 83 | va_list args; 84 | va_start(args, format); 85 | 86 | vprintf(format, args); 87 | 88 | #ifdef CONFIG_SEND_CSI_TO_SD 89 | if (f != NULL) { 90 | vfprintf(f, format, args); 91 | } 92 | #endif 93 | 94 | va_end(args); 95 | } 96 | 97 | void sd_flush() { 98 | #ifdef CONFIG_SEND_CSI_TO_SD 99 | fflush(f); 100 | fclose(f); 101 | f = fopen(filename, "a"); 102 | #endif 103 | } 104 | 105 | #endif //ESP32_CSI_SD_COMPONENT_H 106 | -------------------------------------------------------------------------------- /active_ap/camera_streaming.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | import socket 4 | import collections 5 | import numpy as np 6 | import pyqtgraph as pg 7 | from pyqtgraph.Qt import QtCore, QtGui 8 | 9 | import requests 10 | import PIL.Image 11 | from io import BytesIO 12 | 13 | CAMERA_IP = "192.168.4.4" # can be improved by using mDNS 14 | IMAGE_FRESH_INTERVAL = 20 # ms 15 | 16 | class App(QtGui.QMainWindow): 17 | def __init__(self, parent=None): 18 | super(App, self).__init__(parent) 19 | 20 | #### Create Gui Elements ########### 21 | self.mainbox = pg.LayoutWidget() 22 | self.setCentralWidget(self.mainbox) 23 | 24 | # set up image widget 25 | self.img_w = pg.GraphicsLayoutWidget() 26 | self.mainbox.addWidget(self.img_w, row=0, col=0) 27 | # image view box 28 | self.view = self.img_w.addViewBox() 29 | self.view.setAspectLocked(True) 30 | self.view.setRange(QtCore.QRectF(0,0, 800, 600)) 31 | # image plot 32 | self.img = pg.ImageItem(border='w') 33 | self.view.addItem(self.img) 34 | 35 | # a text label widget for info dispaly 36 | self.label = QtGui.QLabel() 37 | self.mainbox.addWidget(self.label, row=1, col=0) 38 | 39 | #### Set Data ##################### 40 | 41 | self.fps = 0. 42 | self.lastupdate = time.time() 43 | 44 | # bring up camera and stream video 45 | self.setup_camera() 46 | 47 | def calculate_fps(self): 48 | now = time.time() 49 | dt = (now-self.lastupdate) 50 | if dt <= 0: 51 | dt = 0.000000000001 52 | fps2 = 1.0 / dt 53 | self.lastupdate = now 54 | self.fps = self.fps * 0.9 + fps2 * 0.1 55 | 56 | def update_label(self): 57 | tx = 'Mean Frame Rate: {fps:.3f} FPS'.format(fps=self.fps ) 58 | self.label.setText(tx) 59 | 60 | def setup_camera(self): 61 | while True: 62 | # set a large frame size 63 | cmd = {'var': 'framesize', 'val':"8"} 64 | resp = requests.get('http://'+ CAMERA_IP +'/control', params=cmd) 65 | if resp.status_code == 200: 66 | break 67 | 68 | self.stream_iter = requests.get('http://'+ CAMERA_IP +':81/stream', stream=True).iter_content(chunk_size=1024*1024*8) 69 | self.video_buf = bytes() 70 | # schedule the next update call 71 | QtCore.QTimer.singleShot(1, self.update_img) 72 | 73 | def update_img(self): 74 | try: 75 | self.video_buf += next(self.stream_iter) 76 | except: 77 | # schedule the next update call 78 | QtCore.QTimer.singleShot(IMAGE_FRESH_INTERVAL, self.update_img) 79 | return 80 | a = self.video_buf.find(b'\xff\xd8') 81 | b = self.video_buf.find(b'\xff\xd9') 82 | 83 | if a != -1 and b != -1: 84 | chunk_content = self.video_buf[a:b+2] 85 | self.video_buf = self.video_buf[b+2:] 86 | 87 | img_capture = PIL.Image.open(BytesIO(chunk_content)) 88 | img_np = np.array(img_capture.rotate(-90)) 89 | 90 | self.img.setImage(img_np) 91 | 92 | self.calculate_fps() 93 | self.update_label() 94 | 95 | # schedule the next update call 96 | QtCore.QTimer.singleShot(IMAGE_FRESH_INTERVAL, self.update_img) 97 | 98 | 99 | if __name__ == '__main__': 100 | 101 | app = QtGui.QApplication(sys.argv) 102 | thisapp = App() 103 | thisapp.show() 104 | sys.exit(app.exec_()) -------------------------------------------------------------------------------- /_components/csi_component.h: -------------------------------------------------------------------------------- 1 | #ifndef ESP32_CSI_CSI_COMPONENT_H 2 | #define ESP32_CSI_CSI_COMPONENT_H 3 | 4 | #include "time_component.h" 5 | #include "math.h" 6 | 7 | char *project_type; 8 | 9 | #define CSI_RAW 1 10 | #define CSI_AMPLITUDE 0 11 | #define CSI_PHASE 0 12 | 13 | #define CSI_TYPE CSI_RAW 14 | 15 | void _wifi_csi_cb(void *ctx, wifi_csi_info_t *data) { 16 | wifi_csi_info_t d = data[0]; 17 | char mac[20] = {0}; 18 | sprintf(mac, "%02X:%02X:%02X:%02X:%02X:%02X", d.mac[0], d.mac[1], d.mac[2], d.mac[3], d.mac[4], d.mac[5]); 19 | 20 | printf("CSI_DATA,"); 21 | printf("%s,", project_type); 22 | printf("%s,", mac); 23 | 24 | // https://github.com/espressif/esp-idf/blob/9d0ca60398481a44861542638cfdc1949bb6f312/components/esp_wifi/include/esp_wifi_types.h#L314 25 | printf("%d,", d.rx_ctrl.rssi); 26 | printf("%d,", d.rx_ctrl.rate); 27 | printf("%d,", d.rx_ctrl.sig_mode); 28 | printf("%d,", d.rx_ctrl.mcs); 29 | printf("%d,", d.rx_ctrl.cwb); 30 | printf("%d,", d.rx_ctrl.smoothing); 31 | printf("%d,", d.rx_ctrl.not_sounding); 32 | printf("%d,", d.rx_ctrl.aggregation); 33 | printf("%d,", d.rx_ctrl.stbc); 34 | printf("%d,", d.rx_ctrl.fec_coding); 35 | printf("%d,", d.rx_ctrl.sgi); 36 | printf("%d,", d.rx_ctrl.noise_floor); 37 | printf("%d,", d.rx_ctrl.ampdu_cnt); 38 | printf("%d,", d.rx_ctrl.channel); 39 | printf("%d,", d.rx_ctrl.secondary_channel); 40 | printf("%d,", d.rx_ctrl.timestamp); 41 | printf("%d,", d.rx_ctrl.ant); 42 | printf("%d,", d.rx_ctrl.sig_len); 43 | printf("%d,", d.rx_ctrl.rx_state); 44 | 45 | char *resp = time_string_get(); 46 | printf("%d,", real_time_set); 47 | printf("%s,", resp); 48 | free(resp); 49 | 50 | int8_t *my_ptr; 51 | 52 | #if CSI_RAW 53 | printf("%d,[", data->len); 54 | my_ptr = data->buf; 55 | 56 | for (int i = 0; i < 128; i++) { 57 | printf("%d ", my_ptr[i]); 58 | } 59 | printf("]"); 60 | #endif 61 | #if CSI_AMPLITUDE 62 | printf("%d,[", data->len); 63 | my_ptr = data->buf; 64 | 65 | for (int i = 0; i < 64; i++) { 66 | printf("%.4f ", sqrt(pow(my_ptr[i * 2], 2) + pow(my_ptr[(i * 2) + 1], 2))); 67 | } 68 | printf("]"); 69 | #endif 70 | #if CSI_PHASE 71 | printf("%d,[", data->len); 72 | my_ptr = data->buf; 73 | 74 | for (int i = 0; i < 64; i++) { 75 | printf("%.4f ", atan2(my_ptr[i*2], my_ptr[(i*2)+1])); 76 | } 77 | printf("]"); 78 | #endif 79 | printf("\n"); 80 | // sd_flush(); 81 | vTaskDelay(0); 82 | } 83 | 84 | void _print_csi_csv_header() { 85 | char *header_str = "type,role,mac,rssi,rate,sig_mode,mcs,bandwidth,smoothing,not_sounding,aggregation,stbc,fec_coding,sgi,noise_floor,ampdu_cnt,channel,secondary_channel,local_timestamp,ant,sig_len,rx_state,real_time_set,real_timestamp,len,CSI_DATA\n"; 86 | printf(header_str); 87 | } 88 | 89 | void csi_init(char *type, wifi_csi_cb_t cb_func_ptr) { 90 | project_type = type; 91 | 92 | ESP_ERROR_CHECK(esp_wifi_set_csi(1)); 93 | 94 | // @See: https://github.com/espressif/esp-idf/blob/master/components/esp_wifi/include/esp_wifi_types.h#L401 95 | wifi_csi_config_t configuration_csi; 96 | configuration_csi.lltf_en = 1; 97 | configuration_csi.htltf_en = 1; 98 | configuration_csi.stbc_htltf2_en = 1; 99 | configuration_csi.ltf_merge_en = 1; 100 | configuration_csi.channel_filter_en = 0; 101 | configuration_csi.manu_scale = 0; 102 | 103 | ESP_ERROR_CHECK(esp_wifi_set_csi_config(&configuration_csi)); 104 | if ( (void*)cb_func_ptr == NULL ) { 105 | // default callback, works but not optimal 106 | ESP_ERROR_CHECK(esp_wifi_set_csi_rx_cb(&_wifi_csi_cb, NULL)); 107 | } else { 108 | ESP_ERROR_CHECK(esp_wifi_set_csi_rx_cb(cb_func_ptr, NULL)); 109 | } 110 | 111 | _print_csi_csv_header(); 112 | } 113 | 114 | #endif //ESP32_CSI_CSI_COMPONENT_H 115 | -------------------------------------------------------------------------------- /active_ap/test_dock.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | This example demonstrates the use of pyqtgraph's dock widget system. 4 | 5 | The dockarea system allows the design of user interfaces which can be rearranged by 6 | the user at runtime. Docks can be moved, resized, stacked, and torn out of the main 7 | window. This is similar in principle to the docking system built into Qt, but 8 | offers a more deterministic dock placement API (in Qt it is very difficult to 9 | programatically generate complex dock arrangements). Additionally, Qt's docks are 10 | designed to be used as small panels around the outer edge of a window. Pyqtgraph's 11 | docks were created with the notion that the entire window (or any portion of it) 12 | would consist of dockable components. 13 | 14 | """ 15 | 16 | 17 | 18 | import initExample ## Add path to library (just for examples; you do not need this) 19 | 20 | import pyqtgraph as pg 21 | from pyqtgraph.Qt import QtCore, QtGui 22 | import pyqtgraph.console 23 | import numpy as np 24 | 25 | from pyqtgraph.dockarea import * 26 | 27 | app = pg.mkQApp("DockArea Example") 28 | win = QtGui.QMainWindow() 29 | area = DockArea() 30 | win.setCentralWidget(area) 31 | win.resize(1000,500) 32 | win.setWindowTitle('pyqtgraph example: dockarea') 33 | 34 | ## Create docks, place them into the window one at a time. 35 | ## Note that size arguments are only a suggestion; docks will still have to 36 | ## fill the entire dock area and obey the limits of their internal widgets. 37 | d1 = Dock("Dock1", size=(1, 1)) ## give this dock the minimum possible size 38 | d2 = Dock("Dock2 - Console", size=(500,300), closable=True) 39 | d3 = Dock("Dock3", size=(500,400)) 40 | d4 = Dock("Dock4 (tabbed) - Plot", size=(500,200)) 41 | d5 = Dock("Dock5 - Image", size=(500,200)) 42 | d6 = Dock("Dock6 (tabbed) - Plot", size=(500,200)) 43 | area.addDock(d1, 'left') ## place d1 at left edge of dock area (it will fill the whole space since there are no other docks yet) 44 | area.addDock(d2, 'right') ## place d2 at right edge of dock area 45 | area.addDock(d3, 'bottom', d1)## place d3 at bottom edge of d1 46 | area.addDock(d4, 'right') ## place d4 at right edge of dock area 47 | area.addDock(d5, 'left', d1) ## place d5 at left edge of d1 48 | area.addDock(d6, 'top', d4) ## place d5 at top edge of d4 49 | 50 | ## Test ability to move docks programatically after they have been placed 51 | area.moveDock(d4, 'top', d2) ## move d4 to top edge of d2 52 | area.moveDock(d6, 'above', d4) ## move d6 to stack on top of d4 53 | area.moveDock(d5, 'top', d2) ## move d5 to top edge of d2 54 | 55 | 56 | ## Add widgets into each dock 57 | 58 | ## first dock gets save/restore buttons 59 | w1 = pg.LayoutWidget() 60 | label = QtGui.QLabel(""" -- DockArea Example -- 61 | This window has 6 Dock widgets in it. Each dock can be dragged 62 | by its title bar to occupy a different space within the window 63 | but note that one dock has its title bar hidden). Additionally, 64 | the borders between docks may be dragged to resize. Docks that are dragged on top 65 | of one another are stacked in a tabbed layout. Double-click a dock title 66 | bar to place it in its own window. 67 | """) 68 | saveBtn = QtGui.QPushButton('Save dock state') 69 | restoreBtn = QtGui.QPushButton('Restore dock state') 70 | restoreBtn.setEnabled(False) 71 | w1.addWidget(label, row=0, col=0) 72 | w1.addWidget(saveBtn, row=1, col=0) 73 | w1.addWidget(restoreBtn, row=2, col=0) 74 | d1.addWidget(w1) 75 | state = None 76 | def save(): 77 | global state 78 | state = area.saveState() 79 | restoreBtn.setEnabled(True) 80 | def load(): 81 | global state 82 | area.restoreState(state) 83 | saveBtn.clicked.connect(save) 84 | restoreBtn.clicked.connect(load) 85 | 86 | 87 | w2 = pg.console.ConsoleWidget() 88 | d2.addWidget(w2) 89 | 90 | ## Hide title bar on dock 3 91 | d3.hideTitleBar() 92 | w3 = pg.PlotWidget(title="Plot inside dock with no title bar") 93 | w3.plot(np.random.normal(size=100)) 94 | d3.addWidget(w3) 95 | 96 | w4 = pg.PlotWidget(title="Dock 4 plot") 97 | w4.plot(np.random.normal(size=100)) 98 | d4.addWidget(w4) 99 | 100 | w5 = pg.ImageView() 101 | w5.setImage(np.random.normal(size=(100,100))) 102 | d5.addWidget(w5) 103 | 104 | w6 = pg.PlotWidget(title="Dock 6 plot") 105 | w6.plot(np.random.normal(size=100)) 106 | d6.addWidget(w6) 107 | 108 | 109 | 110 | win.show() 111 | 112 | 113 | 114 | if __name__ == '__main__': 115 | pg.mkQApp().exec_() 116 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ESP32-CSI-Collection-and-Display 2 | This is a tool to collect and display the CSI information from ESP32 devices and display them in a computer in real time. The ESP32 device does not need to be connected to the computer using a wire (using serial port). The ESP32 devices will send CSI data to target computer using mDNS to resolve IP address and UDP to deliver packets. I also wrote a python3 script to receive and display CSI info in real time. It supports multiple sources of data to be displayed in the same time. 3 | 4 | Based on this tool, I implemented an IoT application to demonstrate the usage of this tool. This IoT system detects the motion according to a threshold. If the CSI deviation exceeds the threshold, the program on the computer will send HTTP request to a HTTP camera in the network to stream video. 5 | 6 | This tool is partially based on https://github.com/StevenMHernandez/ESP32-CSI-Tool 7 | 8 | **To summarize:** 9 | 10 | - A tool to collect and display CSI data form ESP32 devices wirelessly in real-time. 11 | - An IoT application based on this tool to detect motion and wake up a HTTP camera. 12 | 13 | ## How to use 14 | 15 | - **Preparation**: Update your devices' mac addresses in the code. 16 | In `./active_ap/main/main.c` and `./active_client/main/main.c`, a list of mac addresses is used to filter out CSI of packets from unwanted devices. 17 | Using active_ap as an example, the mac address list definition is shown below 18 | ``` 19 | static const uint8_t PEER_NODE_NUM = 4; // self is also included. 20 | static const char peer_mac_list[8][20] = { 21 | "3c:61:05:4c:36:cd", // esp32 official dev board 0, as soft ap 22 | "3c:61:05:4c:3c:28", // esp32 official dev board 1 23 | "08:3a:f2:6c:d3:bc", // esp32 unofficial dev board 0 24 | "08:3a:f2:6e:05:94", // esp32 unofficial dev board 1 25 | }; 26 | ``` 27 | Upadte the code above with the mac addresses of your own devices. 28 | For example, if you are using one ESP32 as AP, and another one as client, 29 | set `PEER_NODE_NUM=2` and replace the first two addresses in `peer_mac_list`. 30 | The mac address of your device will be printed out over serial port (monitor of esp-idf) at the begining of programing running. 31 | Also, output from serial port can be useful for debuging. 32 | 33 | - To use ESP32 as a soft-AP and collect CSI data from received packekts. 34 | 1. Flash the program in './active_ap' to one ESP32 board. A few configs need be updated according to you devices in 'main.c'. 35 | To send the data to the right host, you need to change the mDNS hostname. 36 | ``` 37 | #define TARGET_HOSTNAME "XXXXXXXX" // put your computer mDNS name here. 38 | ``` 39 | To filter out the CSI info you wnat, you need to add your sender device's MAC address in this list. 40 | ``` 41 | static const char peer_mac_list[8][20] = { 42 | "3c:61:05:4c:36:cd", // esp32 official dev board 0, as soft ap, current device 43 | "xx:xx:xx:xx:xx:xx", // mac address(es) of any other peer device you want to collect CSI from. 44 | }; 45 | ``` 46 | 2. Create some clients that send packets the AP periodically. You can flash the program in './udp_client' to other ESP32 boards. (The tool can support multiple clients.) 47 | 3. Connect your computer to the ESP32 WiFi network. Run './active_ap/host_processing_pyqt.py'. You need to change the IP address of your computer accoding to the assigned IP from AP. 48 | ``` 49 | UDP_IP = "192.168.4.2" # put your computer's ip in WiFi netowrk here 50 | ``` 51 | 52 | - To use ESP32 as an active client and colelct CSI data from AP's reply to the ping packets. 53 | 1. Flash the program in './active_client' to one ESP32 board. Similar to above, configs need to be updated. 54 | 2. Connect your computer to the WiFi network. Run './active_ap/host_processing_pyqt.py'. You need to change the IP address of your computer accoding to the assigned IP from AP. 55 | ``` 56 | UDP_IP = "192.168.4.2" # put your computer's ip in WiFi netowrk here 57 | ``` 58 | 59 | - To use motion detection feature. change 'DETECTION_ON = True' in './active_ap/host_processing_pyqt.py'. 60 | 61 | ## A more verbose desciption 62 | TODO 63 | 64 | ## Demo 65 | Two demos are recorded for this project. 66 | 67 | Demo1: 68 | https://drive.google.com/file/d/1r2jrBMXIeLWo95vzawv2DjRA__pLqYqz/view?usp=sharing 69 | 70 | Demo2: 71 | https://drive.google.com/file/d/1ACuFZxcK0tmpH7qY5npmv0mJ1KDCvLjI/view?usp=sharing 72 | -------------------------------------------------------------------------------- /udp_client/example_test.py: -------------------------------------------------------------------------------- 1 | # This example code is in the Public Domain (or CC0 licensed, at your option.) 2 | 3 | # Unless required by applicable law or agreed to in writing, this 4 | # software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 5 | # CONDITIONS OF ANY KIND, either express or implied. 6 | 7 | # -*- coding: utf-8 -*- 8 | 9 | from __future__ import print_function 10 | from __future__ import unicode_literals 11 | from builtins import input 12 | import os 13 | import re 14 | import netifaces 15 | import socket 16 | from threading import Thread, Event 17 | import ttfw_idf 18 | import sys 19 | 20 | 21 | # ----------- Config ---------- 22 | PORT = 3333 23 | INTERFACE = 'eth0' 24 | # ------------------------------- 25 | 26 | 27 | def get_my_ip(type): 28 | for i in netifaces.ifaddresses(INTERFACE)[type]: 29 | return i['addr'].replace("%{}".format(INTERFACE), "") 30 | 31 | 32 | class UdpServer: 33 | 34 | def __init__(self, port, family_addr, persist=False): 35 | self.port = port 36 | self.family_addr = family_addr 37 | self.socket = socket.socket(family_addr, socket.SOCK_DGRAM) 38 | self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 39 | self.socket.settimeout(30.0) 40 | self.shutdown = Event() 41 | self.persist = persist 42 | 43 | def __enter__(self): 44 | try: 45 | self.socket.bind(('', self.port)) 46 | except socket.error as e: 47 | print("Bind failed:{}".format(e)) 48 | raise 49 | 50 | self.server_thread = Thread(target=self.run_server) 51 | self.server_thread.start() 52 | return self 53 | 54 | def __exit__(self, exc_type, exc_value, traceback): 55 | if self.persist: 56 | sock = socket.socket(self.family_addr, socket.SOCK_DGRAM) 57 | sock.sendto(b'Stop', ('localhost', self.port)) 58 | sock.close() 59 | self.shutdown.set() 60 | self.server_thread.join() 61 | self.socket.close() 62 | 63 | def run_server(self): 64 | while not self.shutdown.is_set(): 65 | try: 66 | data, addr = self.socket.recvfrom(1024) 67 | if not data: 68 | return 69 | data = data.decode() 70 | print('Reply[' + addr[0] + ':' + str(addr[1]) + '] - ' + data) 71 | reply = 'OK: ' + data 72 | self.socket.sendto(reply.encode(), addr) 73 | except socket.error as e: 74 | print("Running server failed:{}".format(e)) 75 | raise 76 | if not self.persist: 77 | break 78 | 79 | 80 | @ttfw_idf.idf_example_test(env_tag="Example_WIFI") 81 | def test_examples_protocol_socket(env, extra_data): 82 | """ 83 | steps: 84 | 1. join AP 85 | 2. have the board connect to the server 86 | 3. send and receive data 87 | """ 88 | dut1 = env.get_dut("udp_client", "examples/protocols/sockets/udp_client", dut_class=ttfw_idf.ESP32DUT) 89 | # check and log bin size 90 | binary_file = os.path.join(dut1.app.binary_path, "udp_client.bin") 91 | bin_size = os.path.getsize(binary_file) 92 | ttfw_idf.log_performance("udp_client_bin_size", "{}KB".format(bin_size // 1024)) 93 | ttfw_idf.check_performance("udp_client_bin_size", bin_size // 1024, dut1.TARGET) 94 | 95 | # start test 96 | dut1.start_app() 97 | 98 | data = dut1.expect(re.compile(r" IPv4 address: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)"), timeout=30) 99 | print("Connected with IPv4: {}".format(data[0])) 100 | 101 | # test IPv4 102 | with UdpServer(PORT, socket.AF_INET): 103 | dut1.write(get_my_ip(netifaces.AF_INET)) 104 | dut1.expect(re.compile(r"OK: Message from ESP32")) 105 | # test IPv6 106 | with UdpServer(PORT, socket.AF_INET6): 107 | dut1.write(get_my_ip(netifaces.AF_INET6)) 108 | dut1.expect(re.compile(r"OK: Message from ESP32")) 109 | 110 | 111 | if __name__ == '__main__': 112 | if sys.argv[1:] and sys.argv[1].startswith("IPv"): # if additional arguments provided: 113 | # Usage: example_test.py 114 | family_addr = socket.AF_INET6 if sys.argv[1] == "IPv6" else socket.AF_INET 115 | with UdpServer(PORT, family_addr, persist=True) as s: 116 | print(input("Press Enter stop the server...")) 117 | else: 118 | test_examples_protocol_socket() 119 | -------------------------------------------------------------------------------- /udp_client/main/udp_client.c: -------------------------------------------------------------------------------- 1 | /* BSD Socket API Example 2 | 3 | This example code is in the Public Domain (or CC0 licensed, at your option.) 4 | 5 | Unless required by applicable law or agreed to in writing, this 6 | software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 7 | CONDITIONS OF ANY KIND, either express or implied. 8 | */ 9 | #include 10 | #include 11 | #include "freertos/FreeRTOS.h" 12 | #include "freertos/task.h" 13 | #include "freertos/event_groups.h" 14 | #include "esp_system.h" 15 | #include "esp_wifi.h" 16 | #include "esp_event.h" 17 | #include "esp_log.h" 18 | #include "nvs_flash.h" 19 | #include "esp_netif.h" 20 | #include "protocol_examples_common.h" 21 | 22 | #include "lwip/err.h" 23 | #include "lwip/sockets.h" 24 | #include "lwip/sys.h" 25 | #include 26 | #include "addr_from_stdin.h" 27 | 28 | #if defined(CONFIG_EXAMPLE_IPV4) 29 | #define HOST_IP_ADDR CONFIG_EXAMPLE_IPV4_ADDR // this is set to 192.168.4.1, i.e. the soft-ap 30 | #elif defined(CONFIG_EXAMPLE_IPV6) 31 | #define HOST_IP_ADDR CONFIG_EXAMPLE_IPV6_ADDR 32 | #else 33 | #define HOST_IP_ADDR "" 34 | #endif 35 | 36 | #define PORT CONFIG_EXAMPLE_PORT 37 | 38 | static const char *TAG = "example"; 39 | static const char *payload = "Message from ESP32 "; 40 | 41 | 42 | static void udp_client_task(void *pvParameters) 43 | { 44 | char rx_buffer[128]; 45 | char host_ip[] = HOST_IP_ADDR; 46 | int addr_family = 0; 47 | int ip_protocol = 0; 48 | 49 | while (1) { 50 | 51 | #if defined(CONFIG_EXAMPLE_IPV4) 52 | struct sockaddr_in dest_addr; 53 | dest_addr.sin_addr.s_addr = inet_addr(HOST_IP_ADDR); 54 | dest_addr.sin_family = AF_INET; 55 | dest_addr.sin_port = htons(PORT); 56 | addr_family = AF_INET; 57 | ip_protocol = IPPROTO_IP; 58 | #elif defined(CONFIG_EXAMPLE_IPV6) 59 | struct sockaddr_in6 dest_addr = { 0 }; 60 | inet6_aton(HOST_IP_ADDR, &dest_addr.sin6_addr); 61 | dest_addr.sin6_family = AF_INET6; 62 | dest_addr.sin6_port = htons(PORT); 63 | dest_addr.sin6_scope_id = esp_netif_get_netif_impl_index(EXAMPLE_INTERFACE); 64 | addr_family = AF_INET6; 65 | ip_protocol = IPPROTO_IPV6; 66 | #elif defined(CONFIG_EXAMPLE_SOCKET_IP_INPUT_STDIN) 67 | struct sockaddr_in6 dest_addr = { 0 }; 68 | ESP_ERROR_CHECK(get_addr_from_stdin(PORT, SOCK_DGRAM, &ip_protocol, &addr_family, &dest_addr)); 69 | #endif 70 | 71 | int sock = socket(addr_family, SOCK_DGRAM, ip_protocol); 72 | if (sock < 0) { 73 | ESP_LOGE(TAG, "Unable to create socket: errno %d", errno); 74 | break; 75 | } 76 | ESP_LOGI(TAG, "Socket created, sending to %s:%d", HOST_IP_ADDR, PORT); 77 | 78 | while (1) { 79 | 80 | int err = sendto(sock, payload, strlen(payload), 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr)); 81 | if (err < 0) { 82 | ESP_LOGE(TAG, "Error occurred during sending: errno %d", errno); 83 | vTaskDelay(2000 / portTICK_PERIOD_MS); 84 | break; 85 | } 86 | ESP_LOGI(TAG, "Message sent"); 87 | 88 | // For now, we do not need clients to recv any data. 89 | // struct sockaddr_in source_addr; // Large enough for both IPv4 or IPv6 90 | // socklen_t socklen = sizeof(source_addr); 91 | // int len = recvfrom(sock, rx_buffer, sizeof(rx_buffer) - 1, 0, (struct sockaddr *)&source_addr, &socklen); 92 | 93 | // // Error occurred during receiving 94 | // if (len < 0) { 95 | // ESP_LOGE(TAG, "recvfrom failed: errno %d", errno); 96 | // break; 97 | // } 98 | // // Data received 99 | // else { 100 | // rx_buffer[len] = 0; // Null-terminate whatever we received and treat like a string 101 | // ESP_LOGI(TAG, "Received %d bytes from %s:", len, host_ip); 102 | // ESP_LOGI(TAG, "%s", rx_buffer); 103 | // if (strncmp(rx_buffer, "OK: ", 4) == 0) { 104 | // ESP_LOGI(TAG, "Received expected message, reconnecting"); 105 | // break; 106 | // } 107 | // } 108 | 109 | // 100 ms to provide 10 frames per second 110 | vTaskDelay(100 / portTICK_PERIOD_MS); 111 | } 112 | 113 | if (sock != -1) { 114 | ESP_LOGE(TAG, "Shutting down socket and restarting..."); 115 | shutdown(sock, 0); 116 | close(sock); 117 | } 118 | } 119 | vTaskDelete(NULL); 120 | } 121 | 122 | void app_main(void) 123 | { 124 | ESP_ERROR_CHECK(nvs_flash_init()); 125 | ESP_ERROR_CHECK(esp_netif_init()); 126 | ESP_ERROR_CHECK(esp_event_loop_create_default()); 127 | 128 | /* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig. 129 | * Read "Establishing Wi-Fi or Ethernet Connection" section in 130 | * examples/protocols/README.md for more information about this function. 131 | */ 132 | ESP_ERROR_CHECK(example_connect()); 133 | 134 | xTaskCreate(udp_client_task, "udp_client", 4096, NULL, 5, NULL); 135 | } 136 | -------------------------------------------------------------------------------- /active_ap/host_processing_csi.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import numpy as np 3 | import collections 4 | import matplotlib.pyplot as plt 5 | import time 6 | 7 | UDP_IP = "192.168.4.2" 8 | UDP_PORT = 8848 9 | 10 | QUEUE_LEN = 50 11 | CSI_LEN = 57 * 2 12 | DISP_FRAME_RATE = 10 # 10 frames per second 13 | 14 | node_mac_list = [] 15 | corlor_list = [] 16 | 17 | # lists to hold 'artists' from matplotlib 18 | curve_rssi_list = [] 19 | scatter_rssi_list = [] 20 | text_rssi_list = [] 21 | curve_csi_list = [] 22 | 23 | def parse_data_line (line, data_len) : 24 | data = line.split(",") # separate by commas 25 | assert(data[-1] == "") 26 | data = [ int(x) for x in data[0:-1] ] # ignore the last one 27 | assert(len(data) == data_len) 28 | 29 | return data 30 | 31 | def add_new_node (node_id): 32 | rssi_que_list.append( collections.deque(np.zeros(QUEUE_LEN)) ) 33 | csi_points_list.append( np.ones(CSI_LEN) ) 34 | # new rssi curve 35 | (curve_rssi,) = ax_rssi.plot(disp_time, rssi_que_list[node_id], animated=True) 36 | curve_rssi_list.append(curve_rssi) 37 | scatter_rssi = ax_rssi.scatter( disp_time[-1], rssi_que_list[node_id][-1], animated=True) 38 | scatter_rssi_list.append(scatter_rssi) 39 | text_rssi = ax_rssi.text( disp_time[-2], rssi_que_list[node_id][-1]+2, "{} dB".format(rssi_que_list[node_id][-1]), animated=True) 40 | text_rssi_list.append(text_rssi) 41 | # new csi curve 42 | (curve_csi,) = ax_csi.plot(csi_points_list[node_id], animated=True) 43 | curve_csi_list.append(curve_csi) 44 | 45 | 46 | def parse_data_packet (data) : 47 | data_str = str(data, encoding="ascii") 48 | lines = data_str.splitlines() 49 | node_id = -1 50 | for l_count in range(len(lines)): 51 | line = lines[l_count] 52 | print(line) 53 | items = line.split(",") 54 | 55 | if items[0].find("mac =") >= 0: 56 | mac_addr = items[0][items[0].find("mac =") + 5:] 57 | # if a new mac addr 58 | if not mac_addr in node_mac_list: 59 | node_mac_list.append(mac_addr) 60 | node_id = len(node_mac_list) - 1 61 | add_new_node(node_id) 62 | else: 63 | node_id = node_mac_list.index(mac_addr) 64 | 65 | if items[0] == "rx_ctrl info": 66 | # the next line should be rx_ctrl info. 67 | tmp_pos = items[1].find("len = ") 68 | rx_ctrl_len = int(items[1][tmp_pos+6:]) 69 | # parse rx ctrl data 70 | rx_ctrl_data = parse_data_line(lines[l_count + 1], rx_ctrl_len) 71 | 72 | if items[0] == "RAW" : 73 | # the next line should be raw csi data. 74 | tmp_pos = items[1].find("len = ") 75 | raw_csi_len = int(items[1][tmp_pos+6:]) 76 | # parse csi raw data 77 | raw_csi_data = parse_data_line(lines[l_count + 1], raw_csi_len) 78 | # a newline to separate packets 79 | print() 80 | 81 | return ( rx_ctrl_data, raw_csi_data, node_id) 82 | 83 | # scale csi data accoding to SNR 84 | # change to numpy array as well 85 | def cook_csi_data (rx_ctrl_info, raw_csi_data) : 86 | rssi = rx_ctrl_info[0] # dbm 87 | noise_floor = rx_ctrl_info[11] # dbm. The document says unit is 0.25 dbm but it does not make sense. 88 | # do not know AGC 89 | 90 | # Each channel frequency response of sub-carrier is recorded by two bytes of signed characters. 91 | # The first one is imaginary part and the second one is real part. 92 | raw_csi_data = [ (raw_csi_data[2*i] * 1j + raw_csi_data[2*i + 1]) for i in range(int(len(raw_csi_data) / 2)) ] 93 | raw_csi_array = np.array(raw_csi_data) 94 | 95 | ## Note:this part of SNR computation may not be accurate. 96 | # The reason is that ESP32 may not provide a accurate noise floor value. 97 | # The underlying reason could tha AGC is not calculated explicitly 98 | # so ESP32 doc just consider noise * 0.25 dbm as a estimated value. (described in the official doc) 99 | # But here I will jut use the noise value in rx_ctrl info times 1 dbm as the noise floor. 100 | # scale csi 101 | snr_db = rssi - noise_floor # dB 102 | snr_abs = 10**(snr_db / 10.0) # from db back to normal 103 | csi_sum = np.sum(np.abs(raw_csi_array)**2) 104 | num_subcarrier = len(raw_csi_array) 105 | scale = np.sqrt((snr_abs / csi_sum) * num_subcarrier) 106 | raw_csi_array = raw_csi_array * scale 107 | print("SNR = {} dB".format(snr_db)) 108 | # 109 | 110 | # TODO: delete pilot subcarriers 111 | # Note: 112 | # check https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/wifi.html 113 | # section 'Wi-Fi Channel State Information' 114 | # sub-carrier index : LLTF (-64~-1) + HT-LTF (0~63,-64~-1) 115 | # In the 40MHz HT transmission, two adjacent 20MHz channels are used. 116 | # The channel is divided into 128 sub-carriers. 6 pilot signals are inserted in sub-carriers -53, -25, -11, 11, 25, 53. 117 | # Signal is transmitted on sub-carriers -58 to -2 and 2 to 58. 118 | assert(len(raw_csi_array) == 64 * 3) 119 | cooked_csi_array = raw_csi_array[64:] 120 | # rearrange to -58 ~ -2 and 2 ~ 58. 121 | cooked_csi_array = np.concatenate((cooked_csi_array[-58:-1], cooked_csi_array[2:59])) 122 | assert(len(cooked_csi_array) == CSI_LEN) 123 | 124 | print("RSSI = {} dBm\n".format(rssi)) 125 | return (snr_db, cooked_csi_array) 126 | 127 | # prepare plot 128 | def preapre_fig (): 129 | # animated=True tells matplotlib to only draw the artist when we 130 | # explicitly request it 131 | ax_rssi.set_ylim(10, 50) 132 | (curve_rssi,) = ax_rssi.plot(disp_time, rssi_que_list[0], animated=True) 133 | curve_rssi_list.append(curve_rssi) 134 | scatter_rssi = ax_rssi.scatter( disp_time[-1], rssi_que_list[0][-1], animated=True) 135 | scatter_rssi_list.append(scatter_rssi) 136 | text_rssi = ax_rssi.text( disp_time[-2], rssi_que_list[0][-1]+2, "{} dB".format(rssi_que_list[0][-1]), animated=True) 137 | text_rssi_list.append(text_rssi) 138 | ax_rssi.set_xlabel("Time (s)") 139 | ax_rssi.set_ylabel("SNR (dB)") 140 | 141 | 142 | (curve_csi,) = ax_csi.plot(csi_points_list[0], animated=True) 143 | curve_csi_list.append(curve_csi) 144 | ax_csi.set_ylim(10, 50) 145 | ax_csi.set_xlim(0, CSI_LEN) 146 | ax_csi.set_xlabel("subcarriers [-58, -2] and [2, 58] ") 147 | ax_csi.set_ylabel("CSI (dB)") 148 | 149 | # make sure the window is raised, but the script keeps going 150 | plt.show(block=False) 151 | plt.pause(0.1) # stop to render backgroud 152 | 153 | 154 | if __name__ == "__main__": 155 | # a queue to hold SNR values 156 | rssi_que_list = [collections.deque(np.zeros(QUEUE_LEN))] 157 | csi_points_list = [np.ones(CSI_LEN)] 158 | 159 | # create plot figure 160 | fig = plt.figure(figsize=(12,6)) 161 | ax_rssi = plt.subplot(121) 162 | ax_csi = plt.subplot(122) 163 | 164 | # prepare fig 165 | disp_time = np.array([ (x - QUEUE_LEN + 1)/ DISP_FRAME_RATE for x in range(QUEUE_LEN)]) 166 | preapre_fig() 167 | 168 | # get clean backgroud 169 | bg_clean = fig.canvas.copy_from_bbox(fig.bbox) 170 | 171 | 172 | # create a recv socket for packets from ESP32 soft-ap 173 | sock = socket.socket(socket.AF_INET, # Internet 174 | socket.SOCK_DGRAM) # UDP 175 | sock.bind((UDP_IP, UDP_PORT)) 176 | 177 | # record start time 178 | t_start = time.time() 179 | frame_count = 0 180 | 181 | while True: 182 | # recv UDP packet 183 | data, addr = sock.recvfrom(2048) # buffer size is 2048 bytes 184 | 185 | # parse data packet to get lists of data 186 | (rx_ctrl_data, raw_csi_data, node_id) = parse_data_packet(data) 187 | # only process HT(802.11 n) and 40 MHz frames 188 | # sig-mod and channel bandwidth fields 189 | if rx_ctrl_data[2] != 1 or rx_ctrl_data[4] != 1 : 190 | continue 191 | # node_id not assigned, error 192 | assert(node_id >= 0) 193 | print("Got a HT 40MHz packet ...") 194 | 195 | # prepare csi data 196 | (rssi, csi_data) = cook_csi_data(rx_ctrl_data, raw_csi_data) 197 | 198 | # update RSSI 199 | print("node id = ", node_id) 200 | rssi_que_list[node_id].popleft() 201 | rssi_que_list[node_id].append( rssi ) 202 | # update CSI 203 | csi_points_list[node_id] = 10 * np.log10(np.abs(csi_data)**2) 204 | 205 | # plot rssi and CSI 206 | # 1. restore background 207 | fig.canvas.restore_region(bg_clean) 208 | # 2. update artist class instances 209 | curve_rssi = curve_rssi_list[node_id] 210 | rssi_que = rssi_que_list[node_id] 211 | scatter_rssi = scatter_rssi_list[node_id] 212 | text_rssi = text_rssi_list[node_id] 213 | 214 | curve_rssi.set_ydata(rssi_que) 215 | scatter_rssi.set_offsets( (disp_time[-1] , rssi_que[-1]) ) 216 | text_rssi.set_position( (disp_time[-1], rssi_que[-1]+2) ) 217 | text_rssi.set_text("{} dB".format(rssi_que[-1]) ) 218 | 219 | curve_csi_list[node_id].set_ydata(csi_points_list[node_id]) 220 | # 3. draw 221 | for n in range(len(node_mac_list)): 222 | ax_rssi.draw_artist(curve_rssi_list[n]) 223 | ax_rssi.draw_artist(scatter_rssi_list[n]) 224 | ax_rssi.draw_artist(text_rssi_list[n]) 225 | ax_csi.draw_artist(curve_csi_list[n]) 226 | 227 | # copy the image to the GUI state, but screen might not be changed yet 228 | fig.canvas.blit(fig.bbox) 229 | # flush any pending GUI events, re-painting the screen if needed 230 | # fig.canvas.flush_events() 231 | 232 | # you can put a pause in if you want to slow things down 233 | plt.pause(0.00001) 234 | 235 | # matplotlib is very slow ... Could be the reason of MacOS 236 | # only 15 fps on my macbook 237 | frame_count += 1 238 | print('Mean Frame Rate: {fps:.3f}FPS '.format(fps= (frame_count / (time.time() - t_start)) ) ) 239 | 240 | 241 | 242 | -------------------------------------------------------------------------------- /udp_client/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "Build - Build project", 6 | "type": "shell", 7 | "command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py build", 8 | "windows": { 9 | "command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py build", 10 | "options": { 11 | "env": { 12 | "PATH": "${env:PATH};${config:idf.customExtraPaths}" 13 | } 14 | } 15 | }, 16 | "options": { 17 | "env": { 18 | "PATH": "${env:PATH}:${config:idf.customExtraPaths}" 19 | } 20 | }, 21 | "problemMatcher": [ 22 | { 23 | "owner": "cpp", 24 | "fileLocation": [ 25 | "relative", 26 | "${workspaceFolder}" 27 | ], 28 | "pattern": { 29 | "regexp": "^\\.\\.(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", 30 | "file": 1, 31 | "line": 2, 32 | "column": 3, 33 | "severity": 4, 34 | "message": 5 35 | } 36 | }, 37 | { 38 | "owner": "cpp", 39 | "fileLocation": "absolute", 40 | "pattern": { 41 | "regexp": "^[^\\.](.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", 42 | "file": 1, 43 | "line": 2, 44 | "column": 3, 45 | "severity": 4, 46 | "message": 5 47 | } 48 | } 49 | ], 50 | "group": { 51 | "kind": "build", 52 | "isDefault": true 53 | } 54 | }, 55 | { 56 | "label": "Set ESP-IDF Target", 57 | "type": "shell", 58 | "command": "${command:espIdf.setTarget}", 59 | "problemMatcher": { 60 | "owner": "cpp", 61 | "fileLocation": "absolute", 62 | "pattern": { 63 | "regexp": "^(.*):(//d+):(//d+)://s+(warning|error)://s+(.*)$", 64 | "file": 1, 65 | "line": 2, 66 | "column": 3, 67 | "severity": 4, 68 | "message": 5 69 | } 70 | } 71 | }, 72 | { 73 | "label": "Clean - Clean the project", 74 | "type": "shell", 75 | "command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py fullclean", 76 | "windows": { 77 | "command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py fullclean", 78 | "options": { 79 | "env": { 80 | "PATH": "${env:PATH};${config:idf.customExtraPaths}" 81 | } 82 | } 83 | }, 84 | "options": { 85 | "env": { 86 | "PATH": "${env:PATH}:${config:idf.customExtraPaths}" 87 | } 88 | }, 89 | "problemMatcher": [ 90 | { 91 | "owner": "cpp", 92 | "fileLocation": [ 93 | "relative", 94 | "${workspaceFolder}" 95 | ], 96 | "pattern": { 97 | "regexp": "^\\.\\.(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", 98 | "file": 1, 99 | "line": 2, 100 | "column": 3, 101 | "severity": 4, 102 | "message": 5 103 | } 104 | }, 105 | { 106 | "owner": "cpp", 107 | "fileLocation": "absolute", 108 | "pattern": { 109 | "regexp": "^[^\\.](.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", 110 | "file": 1, 111 | "line": 2, 112 | "column": 3, 113 | "severity": 4, 114 | "message": 5 115 | } 116 | } 117 | ] 118 | }, 119 | { 120 | "label": "Flash - Flash the device", 121 | "type": "shell", 122 | "command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py -p ${config:idf.port} -b ${config:idf.flashBaudRate} flash", 123 | "windows": { 124 | "command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py flash -p ${config:idf.portWin} -b ${config:idf.flashBaudRate}", 125 | "options": { 126 | "env": { 127 | "PATH": "${env:PATH};${config:idf.customExtraPaths}" 128 | } 129 | } 130 | }, 131 | "options": { 132 | "env": { 133 | "PATH": "${env:PATH}:${config:idf.customExtraPaths}" 134 | } 135 | }, 136 | "problemMatcher": [ 137 | { 138 | "owner": "cpp", 139 | "fileLocation": [ 140 | "relative", 141 | "${workspaceFolder}" 142 | ], 143 | "pattern": { 144 | "regexp": "^\\.\\.(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", 145 | "file": 1, 146 | "line": 2, 147 | "column": 3, 148 | "severity": 4, 149 | "message": 5 150 | } 151 | }, 152 | { 153 | "owner": "cpp", 154 | "fileLocation": "absolute", 155 | "pattern": { 156 | "regexp": "^[^\\.](.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", 157 | "file": 1, 158 | "line": 2, 159 | "column": 3, 160 | "severity": 4, 161 | "message": 5 162 | } 163 | } 164 | ] 165 | }, 166 | { 167 | "label": "Monitor: Start the monitor", 168 | "type": "shell", 169 | "command": "${config:idf.pythonBinPath} ${config:idf.espIdfPath}/tools/idf.py -p ${config:idf.port} monitor", 170 | "windows": { 171 | "command": "${config:idf.pythonBinPathWin} ${config:idf.espIdfPathWin}\\tools\\idf.py -p ${config:idf.portWin} monitor", 172 | "options": { 173 | "env": { 174 | "PATH": "${env:PATH};${config:idf.customExtraPaths}" 175 | } 176 | } 177 | }, 178 | "options": { 179 | "env": { 180 | "PATH": "${env:PATH}:${config:idf.customExtraPaths}" 181 | } 182 | }, 183 | "problemMatcher": [ 184 | { 185 | "owner": "cpp", 186 | "fileLocation": [ 187 | "relative", 188 | "${workspaceFolder}" 189 | ], 190 | "pattern": { 191 | "regexp": "^\\.\\.(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", 192 | "file": 1, 193 | "line": 2, 194 | "column": 3, 195 | "severity": 4, 196 | "message": 5 197 | } 198 | }, 199 | { 200 | "owner": "cpp", 201 | "fileLocation": "absolute", 202 | "pattern": { 203 | "regexp": "^[^\\.](.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", 204 | "file": 1, 205 | "line": 2, 206 | "column": 3, 207 | "severity": 4, 208 | "message": 5 209 | } 210 | } 211 | ], 212 | "dependsOn": "Flash - Flash the device" 213 | }, 214 | { 215 | "label": "OpenOCD: Start openOCD", 216 | "type": "shell", 217 | "presentation": { 218 | "echo": true, 219 | "reveal": "never", 220 | "focus": false, 221 | "panel": "new" 222 | }, 223 | "command": "openocd -s ${command:espIdf.getOpenOcdScriptValue} ${command:espIdf.getOpenOcdConfigs}", 224 | "windows": { 225 | "command": "openocd.exe -s ${command:espIdf.getOpenOcdScriptValue} ${command:espIdf.getOpenOcdConfigs}", 226 | "options": { 227 | "env": { 228 | "PATH": "${env:PATH};${config:idf.customExtraPaths}" 229 | } 230 | } 231 | }, 232 | "options": { 233 | "env": { 234 | "PATH": "${env:PATH}:${config:idf.customExtraPaths}" 235 | } 236 | }, 237 | "problemMatcher": { 238 | "owner": "cpp", 239 | "fileLocation": "absolute", 240 | "pattern": { 241 | "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", 242 | "file": 1, 243 | "line": 2, 244 | "column": 3, 245 | "severity": 4, 246 | "message": 5 247 | } 248 | } 249 | }, 250 | { 251 | "label": "adapter", 252 | "type": "shell", 253 | "command": "${config:idf.pythonBinPath}", 254 | "isBackground": true, 255 | "options": { 256 | "env": { 257 | "PATH": "${env:PATH}:${config:idf.customExtraPaths}", 258 | "PYTHONPATH": "${command:espIdf.getExtensionPath}/esp_debug_adapter/debug_adapter" 259 | } 260 | }, 261 | "problemMatcher": { 262 | "background": { 263 | "beginsPattern": "\bDEBUG_ADAPTER_STARTED\b", 264 | "endsPattern": "DEBUG_ADAPTER_READY2CONNECT", 265 | "activeOnStart": true 266 | }, 267 | "pattern": { 268 | "regexp": "(\\d+)-(\\d+)-(\\d+)\\s(\\d+):(\\d+):(\\d+),(\\d+)\\s-(.+)\\s(ERROR)", 269 | "file": 8, 270 | "line": 2, 271 | "column": 3, 272 | "severity": 4, 273 | "message": 9 274 | } 275 | }, 276 | "args": [ 277 | "${command:espIdf.getExtensionPath}/esp_debug_adapter/debug_adapter_main.py", 278 | "-e", 279 | "${workspaceFolder}/build/${command:espIdf.getProjectName}.elf", 280 | "-s", 281 | "${command:espIdf.getOpenOcdScriptValue}", 282 | "-ip", 283 | "localhost", 284 | "-dn", 285 | "${config:idf.adapterTargetName}", 286 | "-om", 287 | "connect_to_instance" 288 | ], 289 | "windows": { 290 | "command": "${config:idf.pythonBinPathWin}", 291 | "options": { 292 | "env": { 293 | "PATH": "${env:PATH};${config:idf.customExtraPaths}", 294 | "PYTHONPATH": "${command:espIdf.getExtensionPath}/esp_debug_adapter/debug_adapter" 295 | } 296 | } 297 | } 298 | } 299 | ] 300 | } -------------------------------------------------------------------------------- /active_ap/host_processing_pyqt.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import time 4 | import socket 5 | import collections 6 | import numpy as np 7 | import pyqtgraph as pg 8 | from pyqtgraph.Qt import QtCore, QtGui 9 | 10 | import requests 11 | import PIL.Image 12 | from io import BytesIO 13 | import subprocess 14 | 15 | # whether turn on motion detection and call video streaming 16 | DETECTION_ON = True 17 | 18 | UDP_IP = "192.168.4.2" # put your computer's ip in WiFi netowrk here 19 | UDP_PORT = 8848 20 | 21 | QUEUE_LEN = 50 22 | CSI_LEN = 57 * 2 23 | DISP_FRAME_RATE = 10 # 10 frames per second, this is decided by the packet sender of CSI 24 | 25 | PLOT_FRESH_INTERVAL = 20 # ms 26 | 27 | node_mac_list = [] 28 | corlor_list = [] 29 | 30 | # lists to hold 'artists' from matplotlib 31 | curve_rssi_list = [] 32 | scatter_rssi_list = [] 33 | text_rssi_list = [] 34 | curve_csi_list = [] 35 | 36 | LOG_LEN = 3 37 | TEST_MIN_NUM = 100 38 | DIFF_THRESHOLD = 3 39 | TARGET_NODE = 0 40 | baseline_alpha = 0.95 41 | test_counter = 0 42 | # compute diff, record multiple records, corr, test peak. 43 | def crossing_decction(new_csi_data): 44 | global csi_data_log 45 | global csi_db_baseline 46 | global test_counter 47 | 48 | test_counter += 1 49 | if len(csi_data_log) < LOG_LEN: 50 | csi_data_log.append( new_csi_data ) 51 | return False 52 | elif test_counter < TEST_MIN_NUM: 53 | csi_data_log.popleft() 54 | csi_data_log.append( new_csi_data ) 55 | # update baseline 56 | csi_db_baseline = csi_db_baseline * baseline_alpha + new_csi_data * (1 - baseline_alpha) 57 | return False 58 | else: 59 | csi_data_log.popleft() 60 | csi_data_log.append( new_csi_data ) 61 | # update baseline 62 | csi_db_baseline = csi_db_baseline * baseline_alpha + new_csi_data * (1 - baseline_alpha) 63 | 64 | csi_diff = np.zeros(CSI_LEN) 65 | for csi in csi_data_log: 66 | csi_diff += ( csi - csi_db_baseline ) / LOG_LEN 67 | 68 | if np.max( np.abs( csi_diff ) ) > DIFF_THRESHOLD: 69 | return True 70 | else: 71 | return False 72 | 73 | 74 | def parse_data_line (line, data_len) : 75 | data = line.split(",") # separate by commas 76 | assert(data[-1] == "") 77 | data = [ int(x) for x in data[0:-1] ] # ignore the last one 78 | assert(len(data) == data_len) 79 | 80 | return data 81 | 82 | def add_new_node (pyqt_app, node_id): 83 | if node_id == 0: 84 | return 85 | rssi_que_list.append( collections.deque(np.zeros(QUEUE_LEN)) ) 86 | csi_points_list.append( np.zeros(CSI_LEN) ) 87 | # new rssi curve 88 | curve_rssi_list.append( pyqt_app.pw1.plot(pen=(node_id, 3)) ) # append SNR curve 89 | 90 | 91 | # new csi curve 92 | curve_csi_list.append( pyqt_app.pw2.plot(pen=(node_id, 3)) ) # append SNR curve 93 | 94 | 95 | def parse_data_packet (pyqt_app, data) : 96 | data_str = str(data, encoding="ascii") 97 | lines = data_str.splitlines() 98 | node_id = -1 99 | for l_count in range(len(lines)): 100 | line = lines[l_count] 101 | print(line) 102 | items = line.split(",") 103 | 104 | if items[0].find("mac =") >= 0: 105 | mac_addr = items[0][items[0].find("mac =") + 5:] 106 | # if a new mac addr 107 | if not mac_addr in node_mac_list: 108 | node_mac_list.append(mac_addr) 109 | node_id = len(node_mac_list) - 1 110 | add_new_node(pyqt_app, node_id) 111 | else: 112 | node_id = node_mac_list.index(mac_addr) 113 | 114 | if items[0] == "rx_ctrl info": 115 | # the next line should be rx_ctrl info. 116 | tmp_pos = items[1].find("len = ") 117 | rx_ctrl_len = int(items[1][tmp_pos+6:]) 118 | # parse rx ctrl data 119 | rx_ctrl_data = parse_data_line(lines[l_count + 1], rx_ctrl_len) 120 | 121 | if items[0] == "RAW" : 122 | # the next line should be raw csi data. 123 | tmp_pos = items[1].find("len = ") 124 | raw_csi_len = int(items[1][tmp_pos+6:]) 125 | # parse csi raw data 126 | raw_csi_data = parse_data_line(lines[l_count + 1], raw_csi_len) 127 | # a newline to separate packets 128 | print() 129 | 130 | return ( rx_ctrl_data, raw_csi_data, node_id) 131 | 132 | # scale csi data accoding to SNR 133 | # change to numpy array as well 134 | def cook_csi_data (rx_ctrl_info, raw_csi_data) : 135 | rssi = rx_ctrl_info[0] # dbm 136 | noise_floor = rx_ctrl_info[11] # dbm. The document says unit is 0.25 dbm but it does not make sense. 137 | # do not know AGC 138 | 139 | # Each channel frequency response of sub-carrier is recorded by two bytes of signed characters. 140 | # The first one is imaginary part and the second one is real part. 141 | raw_csi_data = [ (raw_csi_data[2*i] * 1j + raw_csi_data[2*i + 1]) for i in range(int(len(raw_csi_data) / 2)) ] 142 | raw_csi_array = np.array(raw_csi_data) 143 | 144 | ## Note:this part of SNR computation may not be accurate. 145 | # The reason is that ESP32 may not provide a accurate noise floor value. 146 | # The underlying reason could tha AGC is not calculated explicitly 147 | # so ESP32 doc just consider noise * 0.25 dbm as a estimated value. (described in the official doc) 148 | # But here I will jut use the noise value in rx_ctrl info times 1 dbm as the noise floor. 149 | # scale csi 150 | snr_db = rssi - noise_floor # dB 151 | snr_abs = 10**(snr_db / 10.0) # from db back to normal 152 | csi_sum = np.sum(np.abs(raw_csi_array)**2) 153 | num_subcarrier = len(raw_csi_array) 154 | scale = np.sqrt((snr_abs / csi_sum) * num_subcarrier) 155 | raw_csi_array = raw_csi_array * scale 156 | print("SNR = {} dB".format(snr_db)) 157 | # 158 | 159 | # Note: 160 | # check https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/wifi.html 161 | # section 'Wi-Fi Channel State Information' 162 | # sub-carrier index : LLTF (-64~-1) + HT-LTF (0~63,-64~-1) 163 | # In the 40MHz HT transmission, two adjacent 20MHz channels are used. 164 | # The channel is divided into 128 sub-carriers. 6 pilot signals are inserted in sub-carriers -53, -25, -11, 11, 25, 53. 165 | # Signal is transmitted on sub-carriers -58 to -2 and 2 to 58. 166 | assert(len(raw_csi_array) == 64 * 3) 167 | cooked_csi_array = raw_csi_array[64:] 168 | # rearrange to -58 ~ -2 and 2 ~ 58. 169 | cooked_csi_array = np.concatenate((cooked_csi_array[-58:-1], cooked_csi_array[2:59])) 170 | assert(len(cooked_csi_array) == CSI_LEN) 171 | 172 | print("RSSI = {} dBm\n".format(rssi)) 173 | return (snr_db, cooked_csi_array) 174 | 175 | def update_esp32_data(pyqt_app): 176 | # recv UDP packet aync! 177 | try: 178 | data = sock.recv(2048) # buffer size is 2048 bytes 179 | except: 180 | return -1 181 | 182 | # parse data packet to get lists of data 183 | (rx_ctrl_data, raw_csi_data, node_id) = parse_data_packet(pyqt_app, data) 184 | 185 | # only process HT(802.11 n) and 40 MHz frames without stbc 186 | # Check https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/wifi.html#wi-fi-channel-state-information 187 | # sig-mod, channel bandwidth, stbc fields 188 | if rx_ctrl_data[2] != 1 or rx_ctrl_data[4] != 1 or rx_ctrl_data[8] != 0: 189 | return -1 190 | # you can support more formats by changing cook_csi_data() function 191 | 192 | 193 | # node_id not assigned, error 194 | assert(node_id >= 0) 195 | print("Got a HT 40MHz packet ...") 196 | 197 | # prepare csi data 198 | (rssi, csi_data) = cook_csi_data(rx_ctrl_data, raw_csi_data) 199 | 200 | # update RSSI 201 | print("node id = ", node_id) 202 | rssi_que_list[node_id].popleft() 203 | rssi_que_list[node_id].append( rssi ) 204 | # update CSI 205 | csi_points_list[node_id] = 10 * np.log10(np.abs(csi_data)**2 + 0.1) # + 0.1 to avoid log(0) 206 | 207 | return node_id 208 | 209 | 210 | class App(QtGui.QMainWindow): 211 | def __init__(self, parent=None): 212 | super(App, self).__init__(parent) 213 | 214 | global csi_db_baseline 215 | 216 | #### Create Gui Elements ########### 217 | self.mainbox = pg.LayoutWidget() 218 | self.setCentralWidget(self.mainbox) 219 | 220 | # time domain for plot 1 221 | self.disp_time = np.array([ (x - QUEUE_LEN + 1)/ DISP_FRAME_RATE for x in range(QUEUE_LEN)]) 222 | # set up Plot 1 widget 223 | self.pw1 = pg.PlotWidget(name="Plot1") 224 | curve_rssi_list.append( self.pw1.plot(pen=(0, 3)) ) # append SNR curve 225 | self.mainbox.addWidget(self.pw1, row=0, col=0) 226 | self.pw1.setLabel('left', 'SNR', units='dB') 227 | self.pw1.setLabel('bottom', 'Time ', units=None) 228 | self.pw1.setYRange(20, 70) 229 | 230 | # set up Plot 2 widget 231 | self.pw2 = pg.PlotWidget(name="Plot2") 232 | curve_csi_list.append( self.pw2.plot(pen=(0, 3)) ) # append CSI curve 233 | self.baseline_csi_curve = self.pw2.plot(pen=(10, 3)) # append baseline CSI curve 234 | self.mainbox.addWidget(self.pw2, row=0, col=1) 235 | self.pw2.setLabel('left', 'CSI', units='dB') 236 | self.pw2.setLabel('bottom', 'subcarriers [-58, -2] and [2, 58] ', units=None) 237 | self.pw2.setXRange(0, CSI_LEN) 238 | self.pw2.setYRange(20, 70) 239 | 240 | # # set up image widget 241 | # self.img_w = pg.GraphicsLayoutWidget() 242 | # self.mainbox.addWidget(self.img_w, row=0, col=2) 243 | # # image view box 244 | # self.view = self.img_w.addViewBox() 245 | # self.view.setAspectLocked(True) 246 | # self.view.setRange(QtCore.QRectF(0,0, 800, 600)) 247 | # # image plot 248 | # self.img = pg.ImageItem(border='w') 249 | # self.view.addItem(self.img) 250 | 251 | # a text label widget for info dispaly 252 | self.label = QtGui.QLabel() 253 | self.mainbox.addWidget(self.label, row=1, col=0) 254 | 255 | #### Set Data ##################### 256 | 257 | self.fps = 0. 258 | self.lastupdate = time.time() 259 | 260 | # to start video streaming 261 | # subprocess.Popen(["python3", "camera_streaming.py"]) 262 | 263 | #### Start ##################### 264 | self._update() 265 | 266 | def calculate_fps(self): 267 | now = time.time() 268 | dt = (now-self.lastupdate) 269 | if dt <= 0: 270 | dt = 0.000000000001 271 | fps2 = 1.0 / dt 272 | self.lastupdate = now 273 | self.fps = self.fps * 0.9 + fps2 * 0.1 274 | 275 | def update_label(self): 276 | tx = 'Mean Frame Rate: {fps:.3f} FPS'.format(fps=self.fps ) 277 | self.label.setText(tx) 278 | 279 | def _update(self): 280 | 281 | node_id = update_esp32_data(self) 282 | if node_id < 0: 283 | # schedule the next update call 284 | QtCore.QTimer.singleShot(PLOT_FRESH_INTERVAL, self._update) 285 | return 286 | 287 | curve_rssi_list[node_id].setData(x=self.disp_time, y=rssi_que_list[node_id], pen=(node_id, 3)) 288 | curve_csi_list[node_id].setData(y=csi_points_list[node_id], pen=(node_id, 3)) 289 | 290 | self.calculate_fps() 291 | self.update_label() 292 | 293 | if DETECTION_ON and TARGET_NODE == node_id: 294 | self.baseline_csi_curve.setData(y=csi_db_baseline, pen=(10, 3)) 295 | ret = crossing_decction(csi_points_list[node_id]) 296 | if ret: 297 | subprocess.Popen(["python3", "camera_streaming.py"]) 298 | return 299 | 300 | # schedule the next update call 301 | QtCore.QTimer.singleShot(PLOT_FRESH_INTERVAL, self._update) 302 | 303 | 304 | if __name__ == '__main__': 305 | # a queue to hold SNR values 306 | rssi_que_list = [collections.deque(np.zeros(QUEUE_LEN))] 307 | csi_points_list = [np.zeros(CSI_LEN)] 308 | 309 | csi_data_log = collections.deque() 310 | csi_db_baseline = np.zeros(CSI_LEN) 311 | 312 | # create a recv socket for packets from ESP32 soft-ap 313 | sock = socket.socket(socket.AF_INET, # Internet 314 | socket.SOCK_DGRAM) # UDP 315 | sock.bind((UDP_IP, UDP_PORT)) 316 | sock.settimeout(1) 317 | 318 | app = QtGui.QApplication(sys.argv) 319 | thisapp = App() 320 | thisapp.show() 321 | sys.exit(app.exec_()) -------------------------------------------------------------------------------- /active_ap/main/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "freertos/FreeRTOS.h" 3 | #include "freertos/task.h" 4 | #include "esp_system.h" 5 | #include "esp_spi_flash.h" 6 | #include "esp_wifi.h" 7 | #include "esp_event.h" 8 | #include "esp_log.h" 9 | #include "nvs_flash.h" 10 | #include "mdns.h" 11 | #include 12 | 13 | #include "lwip/err.h" 14 | #include "lwip/sys.h" 15 | #include "lwip/sockets.h" 16 | 17 | // #include "../../_components/nvs_component.h" 18 | // #include "../../_components/sd_component.h" 19 | #include "../../_components/csi_component.h" 20 | // #include "../../_components/time_component.h" 21 | // #include "../../_components/input_component.h" 22 | // #include "../../_components/sockets_component.h" 23 | 24 | /* 25 | * The examples use WiFi configuration that you can set via 'make menuconfig'. 26 | * 27 | * If you'd rather not, just change the below entries to strings with 28 | * the config you want - ie #define EXAMPLE_WIFI_SSID "mywifissid" 29 | */ 30 | #define LEN_MAC_ADDR 20 31 | #define EXAMPLE_ESP_WIFI_SSID "ESP32-AP" 32 | #define EXAMPLE_ESP_WIFI_PASS "esp32-ap" 33 | #define EXAMPLE_ESP_WIFI_CHANNEL 1 34 | #define EXAMPLE_MAX_STA_CONN 16 35 | 36 | #define CSI_QUEUE_SIZE 32 37 | // #define HOST_IP_ADDR "192.168.4.2" // the ip addr of the host computer. 38 | #define TARGET_HOSTNAME "RuichunMacBook-Pro" // put your computer mDNS name here. 39 | #define HOST_UDP_PORT 8848 40 | 41 | 42 | 43 | static const char *TAG = "CSI collection (AP)"; 44 | 45 | static char *target_host_ipv4 = NULL; 46 | 47 | static xQueueHandle csi_info_queue; 48 | 49 | static const uint8_t PEER_NODE_NUM = 4; // self is also included. 50 | static const char peer_mac_list[8][20] = { 51 | "3c:61:05:4c:36:cd", // esp32 official dev board 0, as soft ap 52 | "3c:61:05:4c:3c:28", // esp32 official dev board 1 53 | "08:3a:f2:6c:d3:bc", // esp32 unofficial dev board 0 54 | "08:3a:f2:6e:05:94", // esp32 unofficial dev board 1 55 | }; 56 | 57 | static void csi_handler_task(void *pvParameter); 58 | 59 | static void wifi_event_handler(void* arg, esp_event_base_t event_base, 60 | int32_t event_id, void* event_data) 61 | { 62 | if (event_id == WIFI_EVENT_AP_STACONNECTED) { 63 | wifi_event_ap_staconnected_t* event = (wifi_event_ap_staconnected_t*) event_data; 64 | ESP_LOGI(TAG, "station "MACSTR" join, AID=%d", 65 | MAC2STR(event->mac), event->aid); 66 | } else if (event_id == WIFI_EVENT_AP_STADISCONNECTED) { 67 | wifi_event_ap_stadisconnected_t* event = (wifi_event_ap_stadisconnected_t*) event_data; 68 | ESP_LOGI(TAG, "station "MACSTR" leave, AID=%d", 69 | MAC2STR(event->mac), event->aid); 70 | } 71 | } 72 | 73 | void wifi_init_softap(void) 74 | { 75 | ESP_ERROR_CHECK(esp_netif_init()); 76 | ESP_ERROR_CHECK(esp_event_loop_create_default()); 77 | esp_netif_create_default_wifi_ap(); 78 | 79 | wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); 80 | ESP_ERROR_CHECK(esp_wifi_init(&cfg)); 81 | 82 | ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT, 83 | ESP_EVENT_ANY_ID, 84 | &wifi_event_handler, 85 | NULL, 86 | NULL)); 87 | 88 | wifi_config_t wifi_config = { 89 | .ap = { 90 | .ssid = EXAMPLE_ESP_WIFI_SSID, 91 | .ssid_len = strlen(EXAMPLE_ESP_WIFI_SSID), 92 | .channel = EXAMPLE_ESP_WIFI_CHANNEL, 93 | .password = EXAMPLE_ESP_WIFI_PASS, 94 | .max_connection = EXAMPLE_MAX_STA_CONN, 95 | .authmode = WIFI_AUTH_WPA_WPA2_PSK 96 | }, 97 | }; 98 | if (strlen(EXAMPLE_ESP_WIFI_PASS) == 0) { 99 | wifi_config.ap.authmode = WIFI_AUTH_OPEN; 100 | } 101 | 102 | ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP)); 103 | ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config)); 104 | ESP_ERROR_CHECK(esp_wifi_start()); 105 | 106 | ESP_LOGI(TAG, "wifi_init_softap finished. SSID:%s password:%s channel:%d", 107 | EXAMPLE_ESP_WIFI_SSID, EXAMPLE_ESP_WIFI_PASS, EXAMPLE_ESP_WIFI_CHANNEL); 108 | } 109 | 110 | static char* generate_hostname(void) 111 | { 112 | uint8_t mac[6]; 113 | char *hostname; 114 | esp_read_mac(mac, ESP_MAC_WIFI_STA); 115 | if (-1 == asprintf(&hostname, "%s-%02X%02X%02X", "ESP32_AP", mac[3], mac[4], mac[5])) { 116 | abort(); 117 | } 118 | return hostname; 119 | } 120 | 121 | static void initialise_mdns(void) 122 | { 123 | char* hostname = generate_hostname(); 124 | //initialize mDNS 125 | ESP_ERROR_CHECK( mdns_init() ); 126 | //set mDNS hostname (required if you want to advertise services) 127 | ESP_ERROR_CHECK( mdns_hostname_set(hostname) ); 128 | ESP_LOGI(TAG, "mdns hostname set to: [%s]", hostname); 129 | //set default mDNS instance name 130 | // ESP_ERROR_CHECK( mdns_instance_name_set(EXAMPLE_MDNS_INSTANCE) ); 131 | 132 | //initialize service 133 | // ESP_ERROR_CHECK( mdns_service_add("ESP32-WebServer", "_http", "_tcp", 80, serviceTxtData, 3) ); 134 | 135 | free(hostname); 136 | } 137 | 138 | void wifi_csi_cb(void *ctx, wifi_csi_info_t *data); 139 | void parse_csi (wifi_csi_info_t *data, char* payload); 140 | 141 | void app_main() { 142 | //Initialize NVS 143 | esp_err_t ret = nvs_flash_init(); 144 | if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { 145 | ESP_ERROR_CHECK(nvs_flash_erase()); 146 | ret = nvs_flash_init(); 147 | } 148 | ESP_ERROR_CHECK(ret); 149 | 150 | 151 | // init wifi as soft-ap 152 | wifi_init_softap(); 153 | 154 | // init queue 155 | csi_info_queue = xQueueCreate(CSI_QUEUE_SIZE, sizeof(wifi_csi_info_t)); 156 | if (csi_info_queue == NULL) { 157 | ESP_LOGE(TAG, "Create queue fail"); 158 | return; 159 | } 160 | // register callback that push csi info to the queue 161 | csi_init("AP", &wifi_csi_cb); 162 | 163 | // init mDNS 164 | initialise_mdns(); 165 | 166 | 167 | // start another task to handle CSI data 168 | xTaskCreate(csi_handler_task, "csi_handler_task", 4096, NULL, 4, NULL); 169 | } 170 | 171 | 172 | int is_peer_node (uint8_t mac[6]) { 173 | char mac_str[20] = {0}; 174 | sprintf(mac_str, "%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); 175 | // ESP_LOGI(TAG, "Potential peer mac = %s", mac_str); 176 | for (int p = 0; p < PEER_NODE_NUM; p++) { 177 | // ESP_LOGI(TAG, "Testing peer mac = %s, ret = %d", peer_mac_list[p], strcmp(mac_str, peer_mac_list[p])); 178 | if ( strcmp(mac_str, peer_mac_list[p])==0 ) 179 | return 1; 180 | } 181 | return 0; 182 | } 183 | 184 | /* Callback function is called in WiFi task. 185 | * Users should not do lengthy operations from this task. Instead, post 186 | * necessary data to a queue and handle it from a lower priority task. 187 | * According to ESPNOW example. Makes sense. */ 188 | void wifi_csi_cb(void *ctx, wifi_csi_info_t *data) { 189 | // Done: filtering out packets accroding to mac addr. 190 | if (!is_peer_node(data->mac)) { 191 | // ESP_LOGI(TAG, "Non-peer node csi filtered."); 192 | return; 193 | } 194 | // also need to drop non-HT packets to prevent queue from overflowing 195 | if (data->rx_ctrl.sig_mode == 0) { 196 | // ESP_LOGI(TAG, "Non-HT packet csi filtered."); 197 | return; 198 | } 199 | 200 | // if the host is not ready. 201 | if (target_host_ipv4 == NULL) { 202 | return; 203 | } 204 | 205 | // This callback pushs a csi entry to the queue. 206 | wifi_csi_info_t local_csi_info; 207 | if (data == NULL) { 208 | ESP_LOGE(TAG, "Receive csi cb arg error"); 209 | return; 210 | } 211 | 212 | // copy content from wifi task to local 213 | memcpy(&local_csi_info, data, sizeof(wifi_csi_info_t)); 214 | assert(local_csi_info.len == data->len); 215 | // malloc buf 216 | local_csi_info.buf = malloc(local_csi_info.len); 217 | if (local_csi_info.buf == NULL) { 218 | ESP_LOGE(TAG, "Malloc receive data fail"); 219 | return; 220 | } 221 | memcpy(local_csi_info.buf, data->buf, local_csi_info.len); 222 | // csi info will be copied to the queue, but the buf is still pointing to what we allocated above. 223 | if (xQueueSend(csi_info_queue, &local_csi_info, portMAX_DELAY) != pdTRUE) { 224 | ESP_LOGW(TAG, "Send entry to queue fail"); 225 | free(local_csi_info.buf); 226 | } 227 | ESP_LOGI(TAG, "CSI info pushed to queue"); 228 | 229 | } 230 | 231 | static int query_mdns_host(const char * host_name) 232 | { 233 | ESP_LOGI(TAG, "Query A: %s.local", host_name); 234 | 235 | struct esp_ip4_addr addr; 236 | addr.addr = 0; 237 | 238 | esp_err_t err = mdns_query_a(host_name, 4000, &addr); 239 | if(err){ 240 | if(err == ESP_ERR_NOT_FOUND){ 241 | ESP_LOGW(TAG, "%s: Host was not found!", esp_err_to_name(err)); 242 | return -1; 243 | } 244 | ESP_LOGE(TAG, "Query Failed: %s", esp_err_to_name(err)); 245 | return -1; 246 | } 247 | 248 | ESP_LOGI(TAG, "Query A: %s.local resolved to: " IPSTR, host_name, IP2STR(&addr)); 249 | if (-1 == asprintf(&target_host_ipv4, IPSTR, IP2STR(&addr))) { 250 | abort(); 251 | } 252 | return 0; 253 | } 254 | 255 | int setup_udp_socket (struct sockaddr_in *dest_addr) { 256 | int addr_family = 0; 257 | int ip_protocol = 0; 258 | 259 | if (target_host_ipv4 == NULL) { 260 | while ( query_mdns_host(TARGET_HOSTNAME) < 0) { 261 | ESP_LOGW(TAG, "No target host found, try again ..."); 262 | } 263 | } 264 | 265 | dest_addr->sin_addr.s_addr = inet_addr(target_host_ipv4); 266 | dest_addr->sin_family = AF_INET; 267 | dest_addr->sin_port = htons(HOST_UDP_PORT); 268 | addr_family = AF_INET; 269 | ip_protocol = IPPROTO_IP; 270 | 271 | int sock = socket(addr_family, SOCK_DGRAM, ip_protocol); 272 | if (sock < 0) { 273 | ESP_LOGE(TAG, "Unable to create socket: errno %d", errno); 274 | return sock; 275 | } 276 | ESP_LOGI(TAG, "Socket created, sending to %s:%d", target_host_ipv4, HOST_UDP_PORT); 277 | return sock; 278 | } 279 | 280 | 281 | static void csi_handler_task(void *pvParameter) { 282 | wifi_csi_info_t local_csi; 283 | struct sockaddr_in dest_addr; 284 | char* payload; 285 | int sock; 286 | sock = setup_udp_socket(&dest_addr); 287 | 288 | // we use a max delay. so we keep waiting for new entry. 289 | while (xQueueReceive(csi_info_queue, &local_csi, portMAX_DELAY) == pdTRUE) { 290 | // NOTE: Even not connect to a computer, esp32 is still sending serial data of ESP_LOG. 291 | // so turn them off to speed up. 292 | // ESP_LOGI(TAG, "New CSI Info Recv!"); 293 | // send a udp packet to host computer. 294 | payload = malloc(2048); // TODO: is this enough? 295 | memset(payload, 0, 2048); 296 | 297 | // test data 298 | // sprintf(payload, "test data msg ..."); 299 | parse_csi(&local_csi, payload); 300 | 301 | // send out udp packet 302 | int err = sendto(sock, payload, strlen(payload), 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr)); 303 | if (err < 0) { 304 | ESP_LOGE(TAG, "Error occurred during sending: errno %d", errno); 305 | vTaskDelay(100 / portTICK_PERIOD_MS); 306 | } else { 307 | ESP_LOGI(TAG, "CSI message sent, payload len = %d", strlen(payload)); 308 | } 309 | 310 | // data must be freed !!! 311 | free(local_csi.buf); 312 | free(payload); 313 | vTaskDelay(10 / portTICK_PERIOD_MS); 314 | } 315 | ESP_LOGI(TAG, "CSI Queue Time out!"); 316 | vTaskDelete(NULL); 317 | } 318 | 319 | 320 | void parse_csi (wifi_csi_info_t *data, char* payload) { 321 | wifi_csi_info_t d = *data; 322 | char mac[20] = {0}; 323 | 324 | // data description 325 | sprintf(payload + strlen(payload), "CSI_DATA from Soft-AP\n"); 326 | sprintf(mac, "%02x:%02x:%02x:%02x:%02x:%02x", d.mac[0], d.mac[1], d.mac[2], d.mac[3], d.mac[4], d.mac[5]); 327 | // src mac addr 328 | sprintf(payload + strlen(payload), "src mac = %s\n", mac); 329 | 330 | // https://github.com/espressif/esp-idf/blob/9d0ca60398481a44861542638cfdc1949bb6f312/components/esp_wifi/include/esp_wifi_types.h#L314 331 | // rx_ctrl info 332 | sprintf(payload + strlen(payload), "rx_ctrl info, len = %d\n", 19); 333 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.rssi); /**< Received Signal Strength Indicator(RSSI) of packet. unit: dBm */ 334 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.rate); /**< PHY rate encoding of the packet. Only valid for non HT(11bg) packet */ 335 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.sig_mode); /**< 0: non HT(11bg) packet; 1: HT(11n) packet; 3: VHT(11ac) packet */ 336 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.mcs); /**< Modulation Coding Scheme. If is HT(11n) packet, shows the modulation, range from 0 to 76(MSC0 ~ MCS76) */ 337 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.cwb); /**< Channel Bandwidth of the packet. 0: 20MHz; 1: 40MHz */ 338 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.smoothing); 339 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.not_sounding); 340 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.aggregation); 341 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.stbc); 342 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.fec_coding); 343 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.sgi); 344 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.noise_floor); /**< noise floor of Radio Frequency Module(RF). unit: 0.25dBm*/ 345 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.ampdu_cnt); 346 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.channel); 347 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.secondary_channel); 348 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.timestamp); 349 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.ant); 350 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.sig_len); 351 | sprintf(payload + strlen(payload), "%d,\n", d.rx_ctrl.rx_state); 352 | // new line 353 | 354 | // show some info on monitor 355 | ESP_LOGI(TAG, "CSI from %s, buf_len = %d, rssi = %d, rate = %d, sig_mode = %d, mcs = %d, cwb = %d", \ 356 | mac, d.len, d.rx_ctrl.rssi, d.rx_ctrl.rate, d.rx_ctrl.sig_mode, d.rx_ctrl.mcs, d.rx_ctrl.cwb); 357 | 358 | int8_t *my_ptr; 359 | 360 | #if CSI_RAW 361 | sprintf(payload + strlen(payload), "RAW, len = %d\n", data->len); 362 | my_ptr = data->buf; 363 | 364 | for (int i = 0; i < data->len; i++) { 365 | sprintf(payload + strlen(payload), "%d,", my_ptr[i]); 366 | } 367 | sprintf(payload + strlen(payload), "\n"); // new line 368 | #endif 369 | #if CSI_AMPLITUDE 370 | sprintf(payload + strlen(payload), "AMP len = %d \n", data->len/2); 371 | my_ptr = data->buf; 372 | 373 | for (int i = 0; i < data->len/2; i++) { 374 | sprintf(payload + strlen(payload), "%.4f, ", sqrt(pow(my_ptr[i * 2], 2) + pow(my_ptr[(i * 2) + 1], 2))); 375 | } 376 | sprintf(payload + strlen(payload), "\n"); 377 | #endif 378 | #if CSI_PHASE 379 | sprintf(payload + strlen(payload), "PHASE len = %d \n", data->len/2); 380 | my_ptr = data->buf; 381 | 382 | for (int i = 0; i < data->len/2; i++) { 383 | sprintf(payload + strlen(payload), "%.4f, ", atan2(my_ptr[i*2], my_ptr[(i*2)+1])); 384 | } 385 | sprintf(payload + strlen(payload), "\n"); 386 | #endif 387 | vTaskDelay(0); 388 | } -------------------------------------------------------------------------------- /active_client/main/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "freertos/FreeRTOS.h" 3 | #include "freertos/task.h" 4 | #include "freertos/event_groups.h" 5 | #include "esp_system.h" 6 | #include "esp_spi_flash.h" 7 | #include "esp_wifi.h" 8 | #include "esp_event.h" 9 | #include "esp_log.h" 10 | #include "nvs_flash.h" 11 | #include "mdns.h" 12 | #include 13 | 14 | #include "lwip/err.h" 15 | #include "lwip/sys.h" 16 | #include "lwip/sockets.h" 17 | #include "ping/ping_sock.h" 18 | 19 | 20 | // #include "../../_components/nvs_component.h" 21 | // #include "../../_components/sd_component.h" 22 | #include "../../_components/csi_component.h" 23 | // #include "../../_components/time_component.h" 24 | // #include "../../_components/input_component.h" 25 | // #include "../../_components/sockets_component.h" 26 | 27 | /* 28 | * The examples use WiFi configuration that you can set via 'make menuconfig'. 29 | * 30 | * If you'd rather not, just change the below entries to strings with 31 | * the config you want - ie #define EXAMPLE_WIFI_SSID "mywifissid" 32 | */ 33 | #define LEN_MAC_ADDR 20 34 | // #define EXAMPLE_ESP_WIFI_SSID "StudiosL2F" 35 | // #define EXAMPLE_ESP_WIFI_PASS "sjb13359133" 36 | #define EXAMPLE_ESP_WIFI_SSID "ESP32-AP" 37 | #define EXAMPLE_ESP_WIFI_PASS "esp32-ap" 38 | #define EXAMPLE_ESP_MAXIMUM_RETRY 10 39 | 40 | #define CSI_QUEUE_SIZE 32 41 | // #define HOST_IP_ADDR "192.168.4.2" // the ip addr of the host computer. 42 | #define HOST_UDP_PORT 8848 43 | 44 | 45 | 46 | static const char *TAG = "CSI collection (Client)"; 47 | 48 | static char *target_host_ipv4 = NULL; 49 | 50 | static xQueueHandle csi_info_queue; 51 | 52 | /* FreeRTOS event group to signal when we are connected*/ 53 | static EventGroupHandle_t s_wifi_event_group; 54 | 55 | /* The event group allows multiple bits for each event, but we only care about two events: 56 | * - we are connected to the AP with an IP 57 | * - we failed to connect after the maximum amount of retries */ 58 | #define WIFI_CONNECTED_BIT BIT0 59 | #define WIFI_FAIL_BIT BIT1 60 | 61 | static int s_retry_num = 0; 62 | 63 | static void csi_handler_task(void *pvParameter); 64 | void wifi_csi_cb(void *ctx, wifi_csi_info_t *data); 65 | void parse_csi (wifi_csi_info_t *data, char* payload); 66 | 67 | static void event_handler(void* arg, esp_event_base_t event_base, 68 | int32_t event_id, void* event_data) 69 | { 70 | if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) { 71 | esp_wifi_connect(); 72 | } else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) { 73 | if (s_retry_num < EXAMPLE_ESP_MAXIMUM_RETRY) { 74 | esp_wifi_connect(); 75 | s_retry_num++; 76 | ESP_LOGI(TAG, "retry to connect to the AP"); 77 | } else { 78 | xEventGroupSetBits(s_wifi_event_group, WIFI_FAIL_BIT); 79 | } 80 | ESP_LOGI(TAG,"connect to the AP fail"); 81 | } else if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) { 82 | ip_event_got_ip_t* event = (ip_event_got_ip_t*) event_data; 83 | ESP_LOGI(TAG, "got ip:" IPSTR, IP2STR(&event->ip_info.ip)); 84 | s_retry_num = 0; 85 | xEventGroupSetBits(s_wifi_event_group, WIFI_CONNECTED_BIT); 86 | } 87 | } 88 | 89 | void wifi_init_sta(void) 90 | { 91 | s_wifi_event_group = xEventGroupCreate(); 92 | 93 | ESP_ERROR_CHECK(esp_netif_init()); 94 | 95 | ESP_ERROR_CHECK(esp_event_loop_create_default()); 96 | esp_netif_create_default_wifi_sta(); 97 | 98 | wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); 99 | ESP_ERROR_CHECK(esp_wifi_init(&cfg)); 100 | 101 | esp_event_handler_instance_t instance_any_id; 102 | esp_event_handler_instance_t instance_got_ip; 103 | ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT, 104 | ESP_EVENT_ANY_ID, 105 | &event_handler, 106 | NULL, 107 | &instance_any_id)); 108 | ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT, 109 | IP_EVENT_STA_GOT_IP, 110 | &event_handler, 111 | NULL, 112 | &instance_got_ip)); 113 | 114 | wifi_config_t wifi_config = { 115 | .sta = { 116 | .ssid = EXAMPLE_ESP_WIFI_SSID, 117 | .password = EXAMPLE_ESP_WIFI_PASS, 118 | /* Setting a password implies station will connect to all security modes including WEP/WPA. 119 | * However these modes are deprecated and not advisable to be used. Incase your Access point 120 | * doesn't support WPA2, these mode can be enabled by commenting below line */ 121 | .threshold.authmode = WIFI_AUTH_WPA2_PSK, 122 | 123 | .pmf_cfg = { 124 | .capable = true, 125 | .required = false 126 | }, 127 | }, 128 | }; 129 | ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA) ); 130 | ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) ); 131 | ESP_ERROR_CHECK(esp_wifi_start() ); 132 | 133 | ESP_LOGI(TAG, "wifi_init_sta finished."); 134 | 135 | /* Waiting until either the connection is established (WIFI_CONNECTED_BIT) or connection failed for the maximum 136 | * number of re-tries (WIFI_FAIL_BIT). The bits are set by event_handler() (see above) */ 137 | EventBits_t bits = xEventGroupWaitBits(s_wifi_event_group, 138 | WIFI_CONNECTED_BIT | WIFI_FAIL_BIT, 139 | pdFALSE, 140 | pdFALSE, 141 | portMAX_DELAY); 142 | 143 | /* xEventGroupWaitBits() returns the bits before the call returned, hence we can test which event actually 144 | * happened. */ 145 | if (bits & WIFI_CONNECTED_BIT) { 146 | ESP_LOGI(TAG, "connected to ap SSID:%s password:%s", 147 | EXAMPLE_ESP_WIFI_SSID, EXAMPLE_ESP_WIFI_PASS); 148 | } else if (bits & WIFI_FAIL_BIT) { 149 | ESP_LOGI(TAG, "Failed to connect to SSID:%s, password:%s", 150 | EXAMPLE_ESP_WIFI_SSID, EXAMPLE_ESP_WIFI_PASS); 151 | } else { 152 | ESP_LOGE(TAG, "UNEXPECTED EVENT"); 153 | } 154 | 155 | /* The event will not be processed after unregister */ 156 | ESP_ERROR_CHECK(esp_event_handler_instance_unregister(IP_EVENT, IP_EVENT_STA_GOT_IP, instance_got_ip)); 157 | ESP_ERROR_CHECK(esp_event_handler_instance_unregister(WIFI_EVENT, ESP_EVENT_ANY_ID, instance_any_id)); 158 | vEventGroupDelete(s_wifi_event_group); 159 | } 160 | 161 | 162 | static char* generate_hostname(void) 163 | { 164 | uint8_t mac[6]; 165 | char *hostname; 166 | esp_read_mac(mac, ESP_MAC_WIFI_STA); 167 | if (-1 == asprintf(&hostname, "%s-%02X%02X%02X", "ESP32_AP", mac[3], mac[4], mac[5])) { 168 | abort(); 169 | } 170 | return hostname; 171 | } 172 | 173 | static void initialise_mdns(void) 174 | { 175 | char* hostname = generate_hostname(); 176 | //initialize mDNS 177 | ESP_ERROR_CHECK( mdns_init() ); 178 | //set mDNS hostname (required if you want to advertise services) 179 | ESP_ERROR_CHECK( mdns_hostname_set(hostname) ); 180 | ESP_LOGI(TAG, "mdns hostname set to: [%s]", hostname); 181 | //set default mDNS instance name 182 | // ESP_ERROR_CHECK( mdns_instance_name_set(EXAMPLE_MDNS_INSTANCE) ); 183 | 184 | //initialize service 185 | // ESP_ERROR_CHECK( mdns_service_add("ESP32-WebServer", "_http", "_tcp", 80, serviceTxtData, 3) ); 186 | 187 | free(hostname); 188 | } 189 | 190 | esp_err_t ping_start() 191 | { 192 | static esp_ping_handle_t ping_handle = NULL; 193 | esp_ping_config_t ping_config = { 194 | .count = 0, 195 | .interval_ms = 100, 196 | .timeout_ms = 1000, 197 | .data_size = 1, 198 | .tos = 0, 199 | .task_stack_size = 4096, 200 | .task_prio = 0, 201 | }; 202 | 203 | esp_netif_ip_info_t local_ip; 204 | esp_netif_get_ip_info(esp_netif_get_handle_from_ifkey("WIFI_STA_DEF"), &local_ip); 205 | ESP_LOGI(TAG, "got ip:" IPSTR ", gw: " IPSTR, IP2STR(&local_ip.ip), IP2STR(&local_ip.gw)); 206 | inet_addr_to_ip4addr(ip_2_ip4(&ping_config.target_addr), (struct in_addr *)&local_ip.gw); 207 | 208 | esp_ping_callbacks_t cbs = { 0 }; 209 | esp_ping_new_session(&ping_config, &cbs, &ping_handle); 210 | esp_ping_start(ping_handle); 211 | 212 | return ESP_OK; 213 | } 214 | 215 | void app_main() { 216 | //Initialize NVS 217 | esp_err_t ret = nvs_flash_init(); 218 | if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { 219 | ESP_ERROR_CHECK(nvs_flash_erase()); 220 | ret = nvs_flash_init(); 221 | } 222 | ESP_ERROR_CHECK(ret); 223 | 224 | 225 | // init wifi as a station 226 | wifi_init_sta(); 227 | 228 | // init queue 229 | csi_info_queue = xQueueCreate(CSI_QUEUE_SIZE, sizeof(wifi_csi_info_t)); 230 | if (csi_info_queue == NULL) { 231 | ESP_LOGE(TAG, "Create queue fail"); 232 | return; 233 | } 234 | // register callback that push csi info to the queue 235 | csi_init("AP", &wifi_csi_cb); 236 | 237 | // init mDNS 238 | initialise_mdns(); 239 | 240 | // start ping the gateway 241 | ping_start(); 242 | 243 | // start another task to handle CSI data 244 | xTaskCreate(csi_handler_task, "csi_handler_task", 4096, NULL, 4, NULL); 245 | } 246 | 247 | 248 | /* Callback function is called in WiFi task. 249 | * Users should not do lengthy operations from this task. Instead, post 250 | * necessary data to a queue and handle it from a lower priority task. 251 | * According to ESPNOW example. Makes sense. */ 252 | void wifi_csi_cb(void *ctx, wifi_csi_info_t *data) { 253 | // drop non-HT packets to prevent queue from overflowing 254 | if (data->rx_ctrl.sig_mode == 0) { 255 | // ESP_LOGI(TAG, "Non-HT packet csi filtered."); 256 | return; 257 | } 258 | 259 | // if the host is not ready. 260 | if (target_host_ipv4 == NULL) { 261 | return; 262 | } 263 | 264 | // This callback pushs a csi entry to the queue. 265 | wifi_csi_info_t local_csi_info; 266 | if (data == NULL) { 267 | ESP_LOGE(TAG, "Receive csi cb arg error"); 268 | return; 269 | } 270 | 271 | // copy content from wifi task to local 272 | memcpy(&local_csi_info, data, sizeof(wifi_csi_info_t)); 273 | assert(local_csi_info.len == data->len); 274 | // malloc buf 275 | local_csi_info.buf = malloc(local_csi_info.len); 276 | if (local_csi_info.buf == NULL) { 277 | ESP_LOGE(TAG, "Malloc receive data fail"); 278 | return; 279 | } 280 | memcpy(local_csi_info.buf, data->buf, local_csi_info.len); 281 | // csi info will be copied to the queue, but the buf is still pointing to what we allocated above. 282 | if (xQueueSend(csi_info_queue, &local_csi_info, portMAX_DELAY) != pdTRUE) { 283 | ESP_LOGW(TAG, "Send entry to queue fail"); 284 | free(local_csi_info.buf); 285 | } 286 | ESP_LOGI(TAG, "CSI info pushed to queue"); 287 | 288 | } 289 | 290 | static int query_mdns_host(const char * host_name) 291 | { 292 | ESP_LOGI(TAG, "Query A: %s.local", host_name); 293 | 294 | struct esp_ip4_addr addr; 295 | addr.addr = 0; 296 | 297 | esp_err_t err = mdns_query_a(host_name, 4000, &addr); 298 | if(err){ 299 | if(err == ESP_ERR_NOT_FOUND){ 300 | ESP_LOGW(TAG, "%s: Host was not found!", esp_err_to_name(err)); 301 | return -1; 302 | } 303 | ESP_LOGE(TAG, "Query Failed: %s", esp_err_to_name(err)); 304 | return -1; 305 | } 306 | 307 | ESP_LOGI(TAG, "Query A: %s.local resolved to: " IPSTR, host_name, IP2STR(&addr)); 308 | if (-1 == asprintf(&target_host_ipv4, IPSTR, IP2STR(&addr))) { 309 | abort(); 310 | } 311 | return 0; 312 | } 313 | 314 | int setup_udp_socket (struct sockaddr_in *dest_addr) { 315 | int addr_family = 0; 316 | int ip_protocol = 0; 317 | 318 | if (target_host_ipv4 == NULL) { 319 | while ( query_mdns_host("RuichunMacBook-Pro") < 0) { 320 | ESP_LOGW(TAG, "No target host found, try again ..."); 321 | } 322 | } 323 | 324 | dest_addr->sin_addr.s_addr = inet_addr(target_host_ipv4); 325 | dest_addr->sin_family = AF_INET; 326 | dest_addr->sin_port = htons(HOST_UDP_PORT); 327 | addr_family = AF_INET; 328 | ip_protocol = IPPROTO_IP; 329 | 330 | int sock = socket(addr_family, SOCK_DGRAM, ip_protocol); 331 | if (sock < 0) { 332 | ESP_LOGE(TAG, "Unable to create socket: errno %d", errno); 333 | return sock; 334 | } 335 | ESP_LOGI(TAG, "Socket created, sending to %s:%d", target_host_ipv4, HOST_UDP_PORT); 336 | return sock; 337 | } 338 | 339 | static void csi_handler_task(void *pvParameter) { 340 | wifi_csi_info_t local_csi; 341 | struct sockaddr_in dest_addr; 342 | char* payload; 343 | int sock; 344 | sock = setup_udp_socket(&dest_addr); 345 | 346 | // we use a max delay. so we keep waiting for new entry. 347 | while (xQueueReceive(csi_info_queue, &local_csi, portMAX_DELAY) == pdTRUE) { 348 | // NOTE: Even not connect to a computer, esp32 is still sending serial data of ESP_LOG. 349 | // so turn them off to speed up. 350 | // ESP_LOGI(TAG, "New CSI Info Recv!"); 351 | // send a udp packet to host computer. 352 | payload = malloc(2048); // TODO: is this enough? 353 | memset(payload, 0, 2048); 354 | 355 | // test data 356 | // sprintf(payload, "test data msg ..."); 357 | parse_csi(&local_csi, payload); 358 | 359 | // send out udp packet 360 | // Note: when the client sends csi info packets to host computer, it will also trigger packets from router. 361 | // This will form a amplifying loop to create many packets. So drop some CSI info packets here. 362 | int err = 0; 363 | if (strlen(payload) % 4 == 0) { 364 | err = sendto(sock, payload, strlen(payload), 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr)); 365 | } 366 | if (err < 0) { 367 | ESP_LOGE(TAG, "Error occurred during sending: errno %d", errno); 368 | vTaskDelay(100 / portTICK_PERIOD_MS); 369 | } else { 370 | ESP_LOGI(TAG, "CSI message sent, payload len = %d", strlen(payload)); 371 | } 372 | 373 | // data must be freed !!! 374 | free(local_csi.buf); 375 | free(payload); 376 | vTaskDelay(10 / portTICK_PERIOD_MS); 377 | } 378 | ESP_LOGI(TAG, "CSI Queue Time out!"); 379 | vTaskDelete(NULL); 380 | } 381 | 382 | 383 | void parse_csi (wifi_csi_info_t *data, char* payload) { 384 | wifi_csi_info_t d = *data; 385 | char mac[20] = {0}; 386 | 387 | // data description 388 | sprintf(payload + strlen(payload), "CSI_DATA from Soft-AP\n"); 389 | sprintf(mac, "%02x:%02x:%02x:%02x:%02x:%02x", d.mac[0], d.mac[1], d.mac[2], d.mac[3], d.mac[4], d.mac[5]); 390 | // src mac addr 391 | sprintf(payload + strlen(payload), "src mac = %s\n", mac); 392 | 393 | // https://github.com/espressif/esp-idf/blob/9d0ca60398481a44861542638cfdc1949bb6f312/components/esp_wifi/include/esp_wifi_types.h#L314 394 | // rx_ctrl info 395 | sprintf(payload + strlen(payload), "rx_ctrl info, len = %d\n", 19); 396 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.rssi); /**< Received Signal Strength Indicator(RSSI) of packet. unit: dBm */ 397 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.rate); /**< PHY rate encoding of the packet. Only valid for non HT(11bg) packet */ 398 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.sig_mode); /**< 0: non HT(11bg) packet; 1: HT(11n) packet; 3: VHT(11ac) packet */ 399 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.mcs); /**< Modulation Coding Scheme. If is HT(11n) packet, shows the modulation, range from 0 to 76(MSC0 ~ MCS76) */ 400 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.cwb); /**< Channel Bandwidth of the packet. 0: 20MHz; 1: 40MHz */ 401 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.smoothing); 402 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.not_sounding); 403 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.aggregation); 404 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.stbc); 405 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.fec_coding); 406 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.sgi); 407 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.noise_floor); /**< noise floor of Radio Frequency Module(RF). unit: 0.25dBm*/ 408 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.ampdu_cnt); 409 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.channel); 410 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.secondary_channel); 411 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.timestamp); 412 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.ant); 413 | sprintf(payload + strlen(payload), "%d,", d.rx_ctrl.sig_len); 414 | sprintf(payload + strlen(payload), "%d,\n", d.rx_ctrl.rx_state); 415 | // new line 416 | 417 | // show some info on monitor 418 | ESP_LOGI(TAG, "CSI from %s, buf_len = %d, rssi = %d, rate = %d, sig_mode = %d, mcs = %d, cwb = %d", \ 419 | mac, d.len, d.rx_ctrl.rssi, d.rx_ctrl.rate, d.rx_ctrl.sig_mode, d.rx_ctrl.mcs, d.rx_ctrl.cwb); 420 | 421 | int8_t *my_ptr; 422 | 423 | #if CSI_RAW 424 | sprintf(payload + strlen(payload), "RAW, len = %d\n", data->len); 425 | my_ptr = data->buf; 426 | 427 | for (int i = 0; i < data->len; i++) { 428 | sprintf(payload + strlen(payload), "%d,", my_ptr[i]); 429 | } 430 | sprintf(payload + strlen(payload), "\n"); // new line 431 | #endif 432 | #if CSI_AMPLITUDE 433 | sprintf(payload + strlen(payload), "AMP len = %d \n", data->len/2); 434 | my_ptr = data->buf; 435 | 436 | for (int i = 0; i < data->len/2; i++) { 437 | sprintf(payload + strlen(payload), "%.4f, ", sqrt(pow(my_ptr[i * 2], 2) + pow(my_ptr[(i * 2) + 1], 2))); 438 | } 439 | sprintf(payload + strlen(payload), "\n"); 440 | #endif 441 | #if CSI_PHASE 442 | sprintf(payload + strlen(payload), "PHASE len = %d \n", data->len/2); 443 | my_ptr = data->buf; 444 | 445 | for (int i = 0; i < data->len/2; i++) { 446 | sprintf(payload + strlen(payload), "%.4f, ", atan2(my_ptr[i*2], my_ptr[(i*2)+1])); 447 | } 448 | sprintf(payload + strlen(payload), "\n"); 449 | #endif 450 | vTaskDelay(0); 451 | } -------------------------------------------------------------------------------- /active_ap/sdkconfig: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file. DO NOT EDIT. 3 | # Espressif IoT Development Framework (ESP-IDF) Project Configuration 4 | # 5 | CONFIG_IDF_CMAKE=y 6 | CONFIG_IDF_TARGET="esp32" 7 | CONFIG_IDF_TARGET_ESP32=y 8 | CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 9 | 10 | # 11 | # SDK tool configuration 12 | # 13 | CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-" 14 | # CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set 15 | # end of SDK tool configuration 16 | 17 | # 18 | # Build type 19 | # 20 | CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y 21 | # CONFIG_APP_BUILD_TYPE_ELF_RAM is not set 22 | CONFIG_APP_BUILD_GENERATE_BINARIES=y 23 | CONFIG_APP_BUILD_BOOTLOADER=y 24 | CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y 25 | # end of Build type 26 | 27 | # 28 | # Application manager 29 | # 30 | CONFIG_APP_COMPILE_TIME_DATE=y 31 | # CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set 32 | # CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set 33 | # CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set 34 | CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 35 | # end of Application manager 36 | 37 | # 38 | # Bootloader config 39 | # 40 | CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y 41 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set 42 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set 43 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set 44 | # CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set 45 | # CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set 46 | # CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set 47 | CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y 48 | # CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set 49 | # CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set 50 | CONFIG_BOOTLOADER_LOG_LEVEL=3 51 | # CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set 52 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y 53 | # CONFIG_BOOTLOADER_FACTORY_RESET is not set 54 | # CONFIG_BOOTLOADER_APP_TEST is not set 55 | CONFIG_BOOTLOADER_WDT_ENABLE=y 56 | # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set 57 | CONFIG_BOOTLOADER_WDT_TIME_MS=9000 58 | # CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set 59 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set 60 | CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 61 | # CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set 62 | # end of Bootloader config 63 | 64 | # 65 | # Security features 66 | # 67 | # CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set 68 | # CONFIG_SECURE_BOOT is not set 69 | # CONFIG_SECURE_FLASH_ENC_ENABLED is not set 70 | # end of Security features 71 | 72 | # 73 | # Serial flasher config 74 | # 75 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 76 | CONFIG_ESPTOOLPY_WITH_STUB=y 77 | # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set 78 | # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set 79 | CONFIG_ESPTOOLPY_FLASHMODE_DIO=y 80 | # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set 81 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 82 | # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set 83 | CONFIG_ESPTOOLPY_FLASHFREQ_40M=y 84 | # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set 85 | # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set 86 | CONFIG_ESPTOOLPY_FLASHFREQ="40m" 87 | # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set 88 | CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y 89 | # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set 90 | # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set 91 | # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set 92 | CONFIG_ESPTOOLPY_FLASHSIZE="2MB" 93 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y 94 | CONFIG_ESPTOOLPY_BEFORE_RESET=y 95 | # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set 96 | CONFIG_ESPTOOLPY_BEFORE="default_reset" 97 | CONFIG_ESPTOOLPY_AFTER_RESET=y 98 | # CONFIG_ESPTOOLPY_AFTER_NORESET is not set 99 | CONFIG_ESPTOOLPY_AFTER="hard_reset" 100 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set 101 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set 102 | CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y 103 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set 104 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set 105 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set 106 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set 107 | CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 108 | CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 109 | # end of Serial flasher config 110 | 111 | # 112 | # Partition Table 113 | # 114 | CONFIG_PARTITION_TABLE_SINGLE_APP=y 115 | # CONFIG_PARTITION_TABLE_TWO_OTA is not set 116 | # CONFIG_PARTITION_TABLE_CUSTOM is not set 117 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" 118 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" 119 | CONFIG_PARTITION_TABLE_OFFSET=0x8000 120 | CONFIG_PARTITION_TABLE_MD5=y 121 | # end of Partition Table 122 | 123 | # 124 | # ESP32 CSI Tool Config 125 | # 126 | CONFIG_ESP_WIFI_SSID="myssid" 127 | CONFIG_ESP_WIFI_PASSWORD="mypassword" 128 | CONFIG_SHOULD_COLLECT_CSI=y 129 | CONFIG_SEND_CSI_TO_SERIAL=y 130 | CONFIG_SEND_CSI_TO_SD=y 131 | # end of ESP32 CSI Tool Config 132 | 133 | # 134 | # Compiler options 135 | # 136 | CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y 137 | # CONFIG_COMPILER_OPTIMIZATION_SIZE is not set 138 | # CONFIG_COMPILER_OPTIMIZATION_PERF is not set 139 | # CONFIG_COMPILER_OPTIMIZATION_NONE is not set 140 | CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y 141 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set 142 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set 143 | # CONFIG_COMPILER_CXX_EXCEPTIONS is not set 144 | # CONFIG_COMPILER_CXX_RTTI is not set 145 | CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y 146 | # CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set 147 | # CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set 148 | # CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set 149 | # CONFIG_COMPILER_WARN_WRITE_STRINGS is not set 150 | # CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set 151 | # end of Compiler options 152 | 153 | # 154 | # Component config 155 | # 156 | 157 | # 158 | # Application Level Tracing 159 | # 160 | # CONFIG_APPTRACE_DEST_TRAX is not set 161 | CONFIG_APPTRACE_DEST_NONE=y 162 | CONFIG_APPTRACE_LOCK_ENABLE=y 163 | # end of Application Level Tracing 164 | 165 | # 166 | # Bluetooth 167 | # 168 | # CONFIG_BT_ENABLED is not set 169 | CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0 170 | CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0 171 | CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0 172 | CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=0 173 | CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=0 174 | CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0 175 | CONFIG_BTDM_CTRL_PINNED_TO_CORE=0 176 | CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1 177 | CONFIG_BT_RESERVE_DRAM=0 178 | # end of Bluetooth 179 | 180 | # 181 | # CoAP Configuration 182 | # 183 | CONFIG_COAP_MBEDTLS_PSK=y 184 | # CONFIG_COAP_MBEDTLS_PKI is not set 185 | # CONFIG_COAP_MBEDTLS_DEBUG is not set 186 | CONFIG_COAP_LOG_DEFAULT_LEVEL=0 187 | # end of CoAP Configuration 188 | 189 | # 190 | # Driver configurations 191 | # 192 | 193 | # 194 | # ADC configuration 195 | # 196 | # CONFIG_ADC_FORCE_XPD_FSM is not set 197 | CONFIG_ADC_DISABLE_DAC=y 198 | # end of ADC configuration 199 | 200 | # 201 | # SPI configuration 202 | # 203 | # CONFIG_SPI_MASTER_IN_IRAM is not set 204 | CONFIG_SPI_MASTER_ISR_IN_IRAM=y 205 | # CONFIG_SPI_SLAVE_IN_IRAM is not set 206 | CONFIG_SPI_SLAVE_ISR_IN_IRAM=y 207 | # end of SPI configuration 208 | 209 | # 210 | # UART configuration 211 | # 212 | # CONFIG_UART_ISR_IN_IRAM is not set 213 | # end of UART configuration 214 | 215 | # 216 | # RTCIO configuration 217 | # 218 | # CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set 219 | # end of RTCIO configuration 220 | # end of Driver configurations 221 | 222 | # 223 | # eFuse Bit Manager 224 | # 225 | # CONFIG_EFUSE_CUSTOM_TABLE is not set 226 | # CONFIG_EFUSE_VIRTUAL is not set 227 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set 228 | CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y 229 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set 230 | CONFIG_EFUSE_MAX_BLK_LEN=192 231 | # end of eFuse Bit Manager 232 | 233 | # 234 | # ESP-TLS 235 | # 236 | CONFIG_ESP_TLS_USING_MBEDTLS=y 237 | # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set 238 | # CONFIG_ESP_TLS_SERVER is not set 239 | # CONFIG_ESP_TLS_PSK_VERIFICATION is not set 240 | # end of ESP-TLS 241 | 242 | # 243 | # ESP32-specific 244 | # 245 | CONFIG_ESP32_REV_MIN_0=y 246 | # CONFIG_ESP32_REV_MIN_1 is not set 247 | # CONFIG_ESP32_REV_MIN_2 is not set 248 | # CONFIG_ESP32_REV_MIN_3 is not set 249 | CONFIG_ESP32_REV_MIN=0 250 | CONFIG_ESP32_DPORT_WORKAROUND=y 251 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set 252 | CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y 253 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_240 is not set 254 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160 255 | # CONFIG_ESP32_SPIRAM_SUPPORT is not set 256 | # CONFIG_ESP32_TRAX is not set 257 | CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 258 | # CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set 259 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y 260 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 261 | # CONFIG_ESP32_ULP_COPROC_ENABLED is not set 262 | CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 263 | CONFIG_ESP32_DEBUG_OCDAWARE=y 264 | CONFIG_ESP32_BROWNOUT_DET=y 265 | CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y 266 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set 267 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set 268 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set 269 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set 270 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set 271 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set 272 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set 273 | CONFIG_ESP32_BROWNOUT_DET_LVL=0 274 | CONFIG_ESP32_REDUCE_PHY_TX_POWER=y 275 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y 276 | # CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set 277 | # CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set 278 | # CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set 279 | CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y 280 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set 281 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set 282 | # CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set 283 | CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 284 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 285 | CONFIG_ESP32_XTAL_FREQ_40=y 286 | # CONFIG_ESP32_XTAL_FREQ_26 is not set 287 | # CONFIG_ESP32_XTAL_FREQ_AUTO is not set 288 | CONFIG_ESP32_XTAL_FREQ=40 289 | # CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set 290 | # CONFIG_ESP32_NO_BLOBS is not set 291 | # CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set 292 | # CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set 293 | CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 294 | # end of ESP32-specific 295 | 296 | # 297 | # Power Management 298 | # 299 | # CONFIG_PM_ENABLE is not set 300 | # end of Power Management 301 | 302 | # 303 | # ADC-Calibration 304 | # 305 | CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y 306 | CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y 307 | CONFIG_ADC_CAL_LUT_ENABLE=y 308 | # end of ADC-Calibration 309 | 310 | # 311 | # Common ESP-related 312 | # 313 | CONFIG_ESP_ERR_TO_NAME_LOOKUP=y 314 | CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 315 | CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 316 | CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584 317 | CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 318 | CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y 319 | CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 320 | CONFIG_ESP_CONSOLE_UART_DEFAULT=y 321 | # CONFIG_ESP_CONSOLE_UART_CUSTOM is not set 322 | # CONFIG_ESP_CONSOLE_UART_NONE is not set 323 | CONFIG_ESP_CONSOLE_UART_NUM=0 324 | CONFIG_ESP_CONSOLE_UART_TX_GPIO=1 325 | CONFIG_ESP_CONSOLE_UART_RX_GPIO=3 326 | CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 327 | CONFIG_ESP_INT_WDT=y 328 | CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 329 | CONFIG_ESP_INT_WDT_CHECK_CPU1=y 330 | CONFIG_ESP_TASK_WDT=y 331 | # CONFIG_ESP_TASK_WDT_PANIC is not set 332 | CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 333 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 334 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 335 | # CONFIG_ESP_PANIC_HANDLER_IRAM is not set 336 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y 337 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y 338 | CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y 339 | CONFIG_ESP_MAC_ADDR_UNIVERSE_BT_OFFSET=2 340 | CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y 341 | # end of Common ESP-related 342 | 343 | # 344 | # Ethernet 345 | # 346 | CONFIG_ETH_ENABLED=y 347 | CONFIG_ETH_USE_ESP32_EMAC=y 348 | CONFIG_ETH_PHY_INTERFACE_RMII=y 349 | # CONFIG_ETH_PHY_INTERFACE_MII is not set 350 | CONFIG_ETH_RMII_CLK_INPUT=y 351 | # CONFIG_ETH_RMII_CLK_OUTPUT is not set 352 | CONFIG_ETH_RMII_CLK_IN_GPIO=0 353 | CONFIG_ETH_DMA_BUFFER_SIZE=512 354 | CONFIG_ETH_DMA_RX_BUFFER_NUM=10 355 | CONFIG_ETH_DMA_TX_BUFFER_NUM=10 356 | CONFIG_ETH_USE_SPI_ETHERNET=y 357 | # CONFIG_ETH_SPI_ETHERNET_DM9051 is not set 358 | # CONFIG_ETH_USE_OPENETH is not set 359 | # end of Ethernet 360 | 361 | # 362 | # Event Loop Library 363 | # 364 | # CONFIG_ESP_EVENT_LOOP_PROFILING is not set 365 | CONFIG_ESP_EVENT_POST_FROM_ISR=y 366 | CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y 367 | # end of Event Loop Library 368 | 369 | # 370 | # GDB Stub 371 | # 372 | # end of GDB Stub 373 | 374 | # 375 | # ESP HTTP client 376 | # 377 | CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y 378 | # CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set 379 | # end of ESP HTTP client 380 | 381 | # 382 | # HTTP Server 383 | # 384 | CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 385 | CONFIG_HTTPD_MAX_URI_LEN=512 386 | CONFIG_HTTPD_ERR_RESP_NO_DELAY=y 387 | CONFIG_HTTPD_PURGE_BUF_LEN=32 388 | # CONFIG_HTTPD_LOG_PURGE_DATA is not set 389 | # CONFIG_HTTPD_WS_SUPPORT is not set 390 | # end of HTTP Server 391 | 392 | # 393 | # ESP HTTPS OTA 394 | # 395 | # CONFIG_OTA_ALLOW_HTTP is not set 396 | # end of ESP HTTPS OTA 397 | 398 | # 399 | # ESP HTTPS server 400 | # 401 | # CONFIG_ESP_HTTPS_SERVER_ENABLE is not set 402 | # end of ESP HTTPS server 403 | 404 | # 405 | # ESP NETIF Adapter 406 | # 407 | CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 408 | CONFIG_ESP_NETIF_TCPIP_LWIP=y 409 | # CONFIG_ESP_NETIF_LOOPBACK is not set 410 | CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y 411 | # end of ESP NETIF Adapter 412 | 413 | # 414 | # ESP System Settings 415 | # 416 | # CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set 417 | CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y 418 | # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set 419 | # CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set 420 | # end of ESP System Settings 421 | 422 | # 423 | # High resolution timer (esp_timer) 424 | # 425 | # CONFIG_ESP_TIMER_PROFILING is not set 426 | CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 427 | # CONFIG_ESP_TIMER_IMPL_FRC2 is not set 428 | CONFIG_ESP_TIMER_IMPL_TG0_LAC=y 429 | # end of High resolution timer (esp_timer) 430 | 431 | # 432 | # Wi-Fi 433 | # 434 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 435 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 436 | # CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set 437 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y 438 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 439 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 440 | CONFIG_ESP32_WIFI_CSI_ENABLED=y 441 | CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y 442 | CONFIG_ESP32_WIFI_TX_BA_WIN=6 443 | CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y 444 | CONFIG_ESP32_WIFI_RX_BA_WIN=6 445 | CONFIG_ESP32_WIFI_NVS_ENABLED=y 446 | CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y 447 | # CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set 448 | CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 449 | CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 450 | # CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE is not set 451 | CONFIG_ESP32_WIFI_IRAM_OPT=y 452 | CONFIG_ESP32_WIFI_RX_IRAM_OPT=y 453 | CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y 454 | # end of Wi-Fi 455 | 456 | # 457 | # PHY 458 | # 459 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y 460 | # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set 461 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 462 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 463 | # end of PHY 464 | 465 | # 466 | # Core dump 467 | # 468 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set 469 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set 470 | CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y 471 | # end of Core dump 472 | 473 | # 474 | # FAT Filesystem support 475 | # 476 | # CONFIG_FATFS_CODEPAGE_DYNAMIC is not set 477 | CONFIG_FATFS_CODEPAGE_437=y 478 | # CONFIG_FATFS_CODEPAGE_720 is not set 479 | # CONFIG_FATFS_CODEPAGE_737 is not set 480 | # CONFIG_FATFS_CODEPAGE_771 is not set 481 | # CONFIG_FATFS_CODEPAGE_775 is not set 482 | # CONFIG_FATFS_CODEPAGE_850 is not set 483 | # CONFIG_FATFS_CODEPAGE_852 is not set 484 | # CONFIG_FATFS_CODEPAGE_855 is not set 485 | # CONFIG_FATFS_CODEPAGE_857 is not set 486 | # CONFIG_FATFS_CODEPAGE_860 is not set 487 | # CONFIG_FATFS_CODEPAGE_861 is not set 488 | # CONFIG_FATFS_CODEPAGE_862 is not set 489 | # CONFIG_FATFS_CODEPAGE_863 is not set 490 | # CONFIG_FATFS_CODEPAGE_864 is not set 491 | # CONFIG_FATFS_CODEPAGE_865 is not set 492 | # CONFIG_FATFS_CODEPAGE_866 is not set 493 | # CONFIG_FATFS_CODEPAGE_869 is not set 494 | # CONFIG_FATFS_CODEPAGE_932 is not set 495 | # CONFIG_FATFS_CODEPAGE_936 is not set 496 | # CONFIG_FATFS_CODEPAGE_949 is not set 497 | # CONFIG_FATFS_CODEPAGE_950 is not set 498 | CONFIG_FATFS_CODEPAGE=437 499 | CONFIG_FATFS_LFN_NONE=y 500 | # CONFIG_FATFS_LFN_HEAP is not set 501 | # CONFIG_FATFS_LFN_STACK is not set 502 | CONFIG_FATFS_FS_LOCK=0 503 | CONFIG_FATFS_TIMEOUT_MS=10000 504 | CONFIG_FATFS_PER_FILE_CACHE=y 505 | # end of FAT Filesystem support 506 | 507 | # 508 | # Modbus configuration 509 | # 510 | CONFIG_FMB_COMM_MODE_RTU_EN=y 511 | CONFIG_FMB_COMM_MODE_ASCII_EN=y 512 | CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 513 | CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 514 | CONFIG_FMB_QUEUE_LENGTH=20 515 | CONFIG_FMB_SERIAL_TASK_STACK_SIZE=2048 516 | CONFIG_FMB_SERIAL_BUF_SIZE=256 517 | CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 518 | CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 519 | CONFIG_FMB_SERIAL_TASK_PRIO=10 520 | # CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set 521 | CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 522 | CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 523 | CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 524 | CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 525 | CONFIG_FMB_TIMER_PORT_ENABLED=y 526 | CONFIG_FMB_TIMER_GROUP=0 527 | CONFIG_FMB_TIMER_INDEX=0 528 | # CONFIG_FMB_TIMER_ISR_IN_IRAM is not set 529 | # end of Modbus configuration 530 | 531 | # 532 | # FreeRTOS 533 | # 534 | # CONFIG_FREERTOS_UNICORE is not set 535 | CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF 536 | CONFIG_FREERTOS_CORETIMER_0=y 537 | # CONFIG_FREERTOS_CORETIMER_1 is not set 538 | CONFIG_FREERTOS_HZ=100 539 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y 540 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set 541 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set 542 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y 543 | # CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set 544 | CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y 545 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 546 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 547 | # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set 548 | # CONFIG_FREERTOS_ASSERT_DISABLE is not set 549 | CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 550 | CONFIG_FREERTOS_ISR_STACKSIZE=1536 551 | # CONFIG_FREERTOS_LEGACY_HOOKS is not set 552 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 553 | # CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION is not set 554 | CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 555 | CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 556 | CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 557 | CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 558 | # CONFIG_FREERTOS_USE_TRACE_FACILITY is not set 559 | # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set 560 | CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y 561 | CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y 562 | # CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set 563 | CONFIG_FREERTOS_DEBUG_OCDAWARE=y 564 | # CONFIG_FREERTOS_FPU_IN_ISR is not set 565 | # end of FreeRTOS 566 | 567 | # 568 | # Heap memory debugging 569 | # 570 | CONFIG_HEAP_POISONING_DISABLED=y 571 | # CONFIG_HEAP_POISONING_LIGHT is not set 572 | # CONFIG_HEAP_POISONING_COMPREHENSIVE is not set 573 | CONFIG_HEAP_TRACING_OFF=y 574 | # CONFIG_HEAP_TRACING_STANDALONE is not set 575 | # CONFIG_HEAP_TRACING_TOHOST is not set 576 | # CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set 577 | # end of Heap memory debugging 578 | 579 | # 580 | # jsmn 581 | # 582 | # CONFIG_JSMN_PARENT_LINKS is not set 583 | # CONFIG_JSMN_STRICT is not set 584 | # end of jsmn 585 | 586 | # 587 | # libsodium 588 | # 589 | # end of libsodium 590 | 591 | # 592 | # Log output 593 | # 594 | # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set 595 | # CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set 596 | # CONFIG_LOG_DEFAULT_LEVEL_WARN is not set 597 | CONFIG_LOG_DEFAULT_LEVEL_INFO=y 598 | # CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set 599 | # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set 600 | CONFIG_LOG_DEFAULT_LEVEL=3 601 | CONFIG_LOG_COLORS=y 602 | CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y 603 | # CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set 604 | # end of Log output 605 | 606 | # 607 | # LWIP 608 | # 609 | CONFIG_LWIP_LOCAL_HOSTNAME="espressif" 610 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y 611 | # CONFIG_LWIP_L2_TO_L3_COPY is not set 612 | # CONFIG_LWIP_IRAM_OPTIMIZATION is not set 613 | CONFIG_LWIP_TIMERS_ONDEMAND=y 614 | CONFIG_LWIP_MAX_SOCKETS=10 615 | # CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set 616 | # CONFIG_LWIP_SO_LINGER is not set 617 | CONFIG_LWIP_SO_REUSE=y 618 | CONFIG_LWIP_SO_REUSE_RXTOALL=y 619 | # CONFIG_LWIP_SO_RCVBUF is not set 620 | # CONFIG_LWIP_NETBUF_RECVINFO is not set 621 | CONFIG_LWIP_IP4_FRAG=y 622 | CONFIG_LWIP_IP6_FRAG=y 623 | # CONFIG_LWIP_IP4_REASSEMBLY is not set 624 | # CONFIG_LWIP_IP6_REASSEMBLY is not set 625 | # CONFIG_LWIP_IP_FORWARD is not set 626 | # CONFIG_LWIP_STATS is not set 627 | # CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set 628 | CONFIG_LWIP_ESP_GRATUITOUS_ARP=y 629 | CONFIG_LWIP_GARP_TMR_INTERVAL=60 630 | CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 631 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y 632 | # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set 633 | 634 | # 635 | # DHCP server 636 | # 637 | CONFIG_LWIP_DHCPS_LEASE_UNIT=60 638 | CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 639 | # end of DHCP server 640 | 641 | # CONFIG_LWIP_AUTOIP is not set 642 | # CONFIG_LWIP_IPV6_AUTOCONFIG is not set 643 | CONFIG_LWIP_NETIF_LOOPBACK=y 644 | CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 645 | 646 | # 647 | # TCP 648 | # 649 | CONFIG_LWIP_MAX_ACTIVE_TCP=16 650 | CONFIG_LWIP_MAX_LISTENING_TCP=16 651 | CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y 652 | CONFIG_LWIP_TCP_MAXRTX=12 653 | CONFIG_LWIP_TCP_SYNMAXRTX=12 654 | CONFIG_LWIP_TCP_MSS=1440 655 | CONFIG_LWIP_TCP_TMR_INTERVAL=250 656 | CONFIG_LWIP_TCP_MSL=60000 657 | CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 658 | CONFIG_LWIP_TCP_WND_DEFAULT=5744 659 | CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 660 | CONFIG_LWIP_TCP_QUEUE_OOSEQ=y 661 | # CONFIG_LWIP_TCP_SACK_OUT is not set 662 | # CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set 663 | CONFIG_LWIP_TCP_OVERSIZE_MSS=y 664 | # CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set 665 | # CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set 666 | CONFIG_LWIP_TCP_RTO_TIME=1500 667 | # end of TCP 668 | 669 | # 670 | # UDP 671 | # 672 | CONFIG_LWIP_MAX_UDP_PCBS=16 673 | CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 674 | # end of UDP 675 | 676 | CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 677 | CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 678 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set 679 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set 680 | CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF 681 | # CONFIG_LWIP_PPP_SUPPORT is not set 682 | CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 683 | CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 684 | 685 | # 686 | # ICMP 687 | # 688 | # CONFIG_LWIP_MULTICAST_PING is not set 689 | # CONFIG_LWIP_BROADCAST_PING is not set 690 | # end of ICMP 691 | 692 | # 693 | # LWIP RAW API 694 | # 695 | CONFIG_LWIP_MAX_RAW_PCBS=16 696 | # end of LWIP RAW API 697 | 698 | # 699 | # SNTP 700 | # 701 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 702 | CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 703 | # end of SNTP 704 | 705 | CONFIG_LWIP_ESP_LWIP_ASSERT=y 706 | # end of LWIP 707 | 708 | # 709 | # mbedTLS 710 | # 711 | CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y 712 | # CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set 713 | # CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set 714 | CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y 715 | CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 716 | CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 717 | # CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set 718 | # CONFIG_MBEDTLS_DEBUG is not set 719 | 720 | # 721 | # Certificate Bundle 722 | # 723 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y 724 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y 725 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set 726 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set 727 | # CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set 728 | # end of Certificate Bundle 729 | 730 | # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set 731 | # CONFIG_MBEDTLS_CMAC_C is not set 732 | CONFIG_MBEDTLS_HARDWARE_AES=y 733 | CONFIG_MBEDTLS_HARDWARE_MPI=y 734 | CONFIG_MBEDTLS_HARDWARE_SHA=y 735 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set 736 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set 737 | CONFIG_MBEDTLS_HAVE_TIME=y 738 | # CONFIG_MBEDTLS_HAVE_TIME_DATE is not set 739 | CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y 740 | CONFIG_MBEDTLS_SHA512_C=y 741 | CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y 742 | # CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set 743 | # CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set 744 | # CONFIG_MBEDTLS_TLS_DISABLED is not set 745 | CONFIG_MBEDTLS_TLS_SERVER=y 746 | CONFIG_MBEDTLS_TLS_CLIENT=y 747 | CONFIG_MBEDTLS_TLS_ENABLED=y 748 | 749 | # 750 | # TLS Key Exchange Methods 751 | # 752 | # CONFIG_MBEDTLS_PSK_MODES is not set 753 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y 754 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y 755 | CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y 756 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y 757 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y 758 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y 759 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y 760 | # end of TLS Key Exchange Methods 761 | 762 | CONFIG_MBEDTLS_SSL_RENEGOTIATION=y 763 | # CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set 764 | CONFIG_MBEDTLS_SSL_PROTO_TLS1=y 765 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y 766 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y 767 | # CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set 768 | CONFIG_MBEDTLS_SSL_ALPN=y 769 | CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y 770 | CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y 771 | 772 | # 773 | # Symmetric Ciphers 774 | # 775 | CONFIG_MBEDTLS_AES_C=y 776 | # CONFIG_MBEDTLS_CAMELLIA_C is not set 777 | # CONFIG_MBEDTLS_DES_C is not set 778 | CONFIG_MBEDTLS_RC4_DISABLED=y 779 | # CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set 780 | # CONFIG_MBEDTLS_RC4_ENABLED is not set 781 | # CONFIG_MBEDTLS_BLOWFISH_C is not set 782 | # CONFIG_MBEDTLS_XTEA_C is not set 783 | CONFIG_MBEDTLS_CCM_C=y 784 | CONFIG_MBEDTLS_GCM_C=y 785 | # end of Symmetric Ciphers 786 | 787 | # CONFIG_MBEDTLS_RIPEMD160_C is not set 788 | 789 | # 790 | # Certificates 791 | # 792 | CONFIG_MBEDTLS_PEM_PARSE_C=y 793 | CONFIG_MBEDTLS_PEM_WRITE_C=y 794 | CONFIG_MBEDTLS_X509_CRL_PARSE_C=y 795 | CONFIG_MBEDTLS_X509_CSR_PARSE_C=y 796 | # end of Certificates 797 | 798 | CONFIG_MBEDTLS_ECP_C=y 799 | CONFIG_MBEDTLS_ECDH_C=y 800 | CONFIG_MBEDTLS_ECDSA_C=y 801 | # CONFIG_MBEDTLS_ECJPAKE_C is not set 802 | CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y 803 | CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y 804 | CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y 805 | CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y 806 | CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y 807 | CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y 808 | CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y 809 | CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y 810 | CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y 811 | CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y 812 | CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y 813 | CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y 814 | CONFIG_MBEDTLS_ECP_NIST_OPTIM=y 815 | # CONFIG_MBEDTLS_POLY1305_C is not set 816 | # CONFIG_MBEDTLS_CHACHA20_C is not set 817 | # CONFIG_MBEDTLS_HKDF_C is not set 818 | # CONFIG_MBEDTLS_THREADING_C is not set 819 | # CONFIG_MBEDTLS_SECURITY_RISKS is not set 820 | # end of mbedTLS 821 | 822 | # 823 | # mDNS 824 | # 825 | CONFIG_MDNS_MAX_SERVICES=10 826 | CONFIG_MDNS_TASK_PRIORITY=1 827 | CONFIG_MDNS_TASK_STACK_SIZE=4096 828 | # CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set 829 | CONFIG_MDNS_TASK_AFFINITY_CPU0=y 830 | # CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set 831 | CONFIG_MDNS_TASK_AFFINITY=0x0 832 | CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 833 | CONFIG_MDNS_TIMER_PERIOD_MS=100 834 | # end of mDNS 835 | 836 | # 837 | # ESP-MQTT Configurations 838 | # 839 | CONFIG_MQTT_PROTOCOL_311=y 840 | CONFIG_MQTT_TRANSPORT_SSL=y 841 | CONFIG_MQTT_TRANSPORT_WEBSOCKET=y 842 | CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y 843 | # CONFIG_MQTT_USE_CUSTOM_CONFIG is not set 844 | # CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set 845 | # CONFIG_MQTT_CUSTOM_OUTBOX is not set 846 | # end of ESP-MQTT Configurations 847 | 848 | # 849 | # Newlib 850 | # 851 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y 852 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set 853 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set 854 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set 855 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set 856 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y 857 | # CONFIG_NEWLIB_NANO_FORMAT is not set 858 | # end of Newlib 859 | 860 | # 861 | # NVS 862 | # 863 | # end of NVS 864 | 865 | # 866 | # OpenSSL 867 | # 868 | # CONFIG_OPENSSL_DEBUG is not set 869 | # CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set 870 | CONFIG_OPENSSL_ASSERT_EXIT=y 871 | # end of OpenSSL 872 | 873 | # 874 | # PThreads 875 | # 876 | CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 877 | CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 878 | CONFIG_PTHREAD_STACK_MIN=768 879 | CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y 880 | # CONFIG_PTHREAD_DEFAULT_CORE_0 is not set 881 | # CONFIG_PTHREAD_DEFAULT_CORE_1 is not set 882 | CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 883 | CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" 884 | # end of PThreads 885 | 886 | # 887 | # SPI Flash driver 888 | # 889 | # CONFIG_SPI_FLASH_VERIFY_WRITE is not set 890 | # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set 891 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y 892 | CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y 893 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set 894 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set 895 | # CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set 896 | # CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set 897 | # CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set 898 | CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y 899 | CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 900 | CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 901 | 902 | # 903 | # Auto-detect flash chips 904 | # 905 | CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y 906 | CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y 907 | CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y 908 | # end of Auto-detect flash chips 909 | # end of SPI Flash driver 910 | 911 | # 912 | # SPIFFS Configuration 913 | # 914 | CONFIG_SPIFFS_MAX_PARTITIONS=3 915 | 916 | # 917 | # SPIFFS Cache Configuration 918 | # 919 | CONFIG_SPIFFS_CACHE=y 920 | CONFIG_SPIFFS_CACHE_WR=y 921 | # CONFIG_SPIFFS_CACHE_STATS is not set 922 | # end of SPIFFS Cache Configuration 923 | 924 | CONFIG_SPIFFS_PAGE_CHECK=y 925 | CONFIG_SPIFFS_GC_MAX_RUNS=10 926 | # CONFIG_SPIFFS_GC_STATS is not set 927 | CONFIG_SPIFFS_PAGE_SIZE=256 928 | CONFIG_SPIFFS_OBJ_NAME_LEN=32 929 | # CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set 930 | CONFIG_SPIFFS_USE_MAGIC=y 931 | CONFIG_SPIFFS_USE_MAGIC_LENGTH=y 932 | CONFIG_SPIFFS_META_LENGTH=4 933 | CONFIG_SPIFFS_USE_MTIME=y 934 | 935 | # 936 | # Debug Configuration 937 | # 938 | # CONFIG_SPIFFS_DBG is not set 939 | # CONFIG_SPIFFS_API_DBG is not set 940 | # CONFIG_SPIFFS_GC_DBG is not set 941 | # CONFIG_SPIFFS_CACHE_DBG is not set 942 | # CONFIG_SPIFFS_CHECK_DBG is not set 943 | # CONFIG_SPIFFS_TEST_VISUALISATION is not set 944 | # end of Debug Configuration 945 | # end of SPIFFS Configuration 946 | 947 | # 948 | # TinyUSB 949 | # 950 | 951 | # 952 | # Descriptor configuration 953 | # 954 | CONFIG_USB_DESC_CUSTOM_VID=0x1234 955 | CONFIG_USB_DESC_CUSTOM_PID=0x5678 956 | # end of Descriptor configuration 957 | # end of TinyUSB 958 | 959 | # 960 | # Unity unit testing library 961 | # 962 | CONFIG_UNITY_ENABLE_FLOAT=y 963 | CONFIG_UNITY_ENABLE_DOUBLE=y 964 | # CONFIG_UNITY_ENABLE_COLOR is not set 965 | CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y 966 | # CONFIG_UNITY_ENABLE_FIXTURE is not set 967 | # CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set 968 | # end of Unity unit testing library 969 | 970 | # 971 | # Virtual file system 972 | # 973 | CONFIG_VFS_SUPPORT_IO=y 974 | CONFIG_VFS_SUPPORT_DIR=y 975 | CONFIG_VFS_SUPPORT_SELECT=y 976 | CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y 977 | CONFIG_VFS_SUPPORT_TERMIOS=y 978 | 979 | # 980 | # Host File System I/O (Semihosting) 981 | # 982 | CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 983 | CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 984 | # end of Host File System I/O (Semihosting) 985 | # end of Virtual file system 986 | 987 | # 988 | # Wear Levelling 989 | # 990 | # CONFIG_WL_SECTOR_SIZE_512 is not set 991 | CONFIG_WL_SECTOR_SIZE_4096=y 992 | CONFIG_WL_SECTOR_SIZE=4096 993 | # end of Wear Levelling 994 | 995 | # 996 | # Wi-Fi Provisioning Manager 997 | # 998 | CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 999 | CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 1000 | # end of Wi-Fi Provisioning Manager 1001 | 1002 | # 1003 | # Supplicant 1004 | # 1005 | CONFIG_WPA_MBEDTLS_CRYPTO=y 1006 | # CONFIG_WPA_DEBUG_PRINT is not set 1007 | # CONFIG_WPA_TESTING_OPTIONS is not set 1008 | # CONFIG_WPA_WPS_WARS is not set 1009 | # end of Supplicant 1010 | # end of Component config 1011 | 1012 | # 1013 | # Compatibility options 1014 | # 1015 | # CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set 1016 | # end of Compatibility options 1017 | 1018 | # Deprecated options for backward compatibility 1019 | CONFIG_TOOLPREFIX="xtensa-esp32-elf-" 1020 | # CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set 1021 | # CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set 1022 | # CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set 1023 | CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y 1024 | # CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set 1025 | # CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set 1026 | CONFIG_LOG_BOOTLOADER_LEVEL=3 1027 | # CONFIG_APP_ROLLBACK_ENABLE is not set 1028 | # CONFIG_FLASH_ENCRYPTION_ENABLED is not set 1029 | # CONFIG_FLASHMODE_QIO is not set 1030 | # CONFIG_FLASHMODE_QOUT is not set 1031 | CONFIG_FLASHMODE_DIO=y 1032 | # CONFIG_FLASHMODE_DOUT is not set 1033 | # CONFIG_MONITOR_BAUD_9600B is not set 1034 | # CONFIG_MONITOR_BAUD_57600B is not set 1035 | CONFIG_MONITOR_BAUD_115200B=y 1036 | # CONFIG_MONITOR_BAUD_230400B is not set 1037 | # CONFIG_MONITOR_BAUD_921600B is not set 1038 | # CONFIG_MONITOR_BAUD_2MB is not set 1039 | # CONFIG_MONITOR_BAUD_OTHER is not set 1040 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200 1041 | CONFIG_MONITOR_BAUD=115200 1042 | CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y 1043 | # CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set 1044 | CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y 1045 | # CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set 1046 | # CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set 1047 | # CONFIG_CXX_EXCEPTIONS is not set 1048 | CONFIG_STACK_CHECK_NONE=y 1049 | # CONFIG_STACK_CHECK_NORM is not set 1050 | # CONFIG_STACK_CHECK_STRONG is not set 1051 | # CONFIG_STACK_CHECK_ALL is not set 1052 | # CONFIG_WARN_WRITE_STRINGS is not set 1053 | # CONFIG_DISABLE_GCC8_WARNINGS is not set 1054 | # CONFIG_ESP32_APPTRACE_DEST_TRAX is not set 1055 | CONFIG_ESP32_APPTRACE_DEST_NONE=y 1056 | CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y 1057 | CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0 1058 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0 1059 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 1060 | CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 1061 | CONFIG_ADC2_DISABLE_DAC=y 1062 | # CONFIG_SPIRAM_SUPPORT is not set 1063 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0 1064 | # CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set 1065 | CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y 1066 | CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 1067 | # CONFIG_ULP_COPROC_ENABLED is not set 1068 | CONFIG_ULP_COPROC_RESERVE_MEM=0 1069 | CONFIG_BROWNOUT_DET=y 1070 | CONFIG_BROWNOUT_DET_LVL_SEL_0=y 1071 | # CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set 1072 | # CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set 1073 | # CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set 1074 | # CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set 1075 | # CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set 1076 | # CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set 1077 | # CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set 1078 | CONFIG_BROWNOUT_DET_LVL=0 1079 | CONFIG_REDUCE_PHY_TX_POWER=y 1080 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y 1081 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set 1082 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set 1083 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set 1084 | # CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set 1085 | # CONFIG_NO_BLOBS is not set 1086 | # CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set 1087 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 1088 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 1089 | CONFIG_MAIN_TASK_STACK_SIZE=3584 1090 | CONFIG_IPC_TASK_STACK_SIZE=1024 1091 | CONFIG_CONSOLE_UART_DEFAULT=y 1092 | # CONFIG_CONSOLE_UART_CUSTOM is not set 1093 | # CONFIG_CONSOLE_UART_NONE is not set 1094 | CONFIG_CONSOLE_UART_NUM=0 1095 | CONFIG_CONSOLE_UART_TX_GPIO=1 1096 | CONFIG_CONSOLE_UART_RX_GPIO=3 1097 | CONFIG_CONSOLE_UART_BAUDRATE=115200 1098 | CONFIG_INT_WDT=y 1099 | CONFIG_INT_WDT_TIMEOUT_MS=300 1100 | CONFIG_INT_WDT_CHECK_CPU1=y 1101 | CONFIG_TASK_WDT=y 1102 | # CONFIG_TASK_WDT_PANIC is not set 1103 | CONFIG_TASK_WDT_TIMEOUT_S=5 1104 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 1105 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 1106 | # CONFIG_EVENT_LOOP_PROFILING is not set 1107 | CONFIG_POST_EVENTS_FROM_ISR=y 1108 | CONFIG_POST_EVENTS_FROM_IRAM_ISR=y 1109 | # CONFIG_ESP32S2_PANIC_PRINT_HALT is not set 1110 | CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y 1111 | # CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set 1112 | # CONFIG_ESP32S2_PANIC_GDBSTUB is not set 1113 | CONFIG_TIMER_TASK_STACK_SIZE=3584 1114 | CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 1115 | CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 1116 | CONFIG_MB_QUEUE_LENGTH=20 1117 | CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048 1118 | CONFIG_MB_SERIAL_BUF_SIZE=256 1119 | CONFIG_MB_SERIAL_TASK_PRIO=10 1120 | # CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT is not set 1121 | CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 1122 | CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 1123 | CONFIG_MB_CONTROLLER_STACK_SIZE=4096 1124 | CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 1125 | CONFIG_MB_TIMER_PORT_ENABLED=y 1126 | CONFIG_MB_TIMER_GROUP=0 1127 | CONFIG_MB_TIMER_INDEX=0 1128 | # CONFIG_SUPPORT_STATIC_ALLOCATION is not set 1129 | CONFIG_TIMER_TASK_PRIORITY=1 1130 | CONFIG_TIMER_TASK_STACK_DEPTH=2048 1131 | CONFIG_TIMER_QUEUE_LENGTH=10 1132 | # CONFIG_L2_TO_L3_COPY is not set 1133 | # CONFIG_USE_ONLY_LWIP_SELECT is not set 1134 | CONFIG_ESP_GRATUITOUS_ARP=y 1135 | CONFIG_GARP_TMR_INTERVAL=60 1136 | CONFIG_TCPIP_RECVMBOX_SIZE=32 1137 | CONFIG_TCP_MAXRTX=12 1138 | CONFIG_TCP_SYNMAXRTX=12 1139 | CONFIG_TCP_MSS=1440 1140 | CONFIG_TCP_MSL=60000 1141 | CONFIG_TCP_SND_BUF_DEFAULT=5744 1142 | CONFIG_TCP_WND_DEFAULT=5744 1143 | CONFIG_TCP_RECVMBOX_SIZE=6 1144 | CONFIG_TCP_QUEUE_OOSEQ=y 1145 | # CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set 1146 | CONFIG_TCP_OVERSIZE_MSS=y 1147 | # CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set 1148 | # CONFIG_TCP_OVERSIZE_DISABLE is not set 1149 | CONFIG_UDP_RECVMBOX_SIZE=6 1150 | CONFIG_TCPIP_TASK_STACK_SIZE=3072 1151 | CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 1152 | # CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set 1153 | # CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set 1154 | CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF 1155 | # CONFIG_PPP_SUPPORT is not set 1156 | CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 1157 | CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 1158 | CONFIG_ESP32_PTHREAD_STACK_MIN=768 1159 | CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y 1160 | # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set 1161 | # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set 1162 | CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 1163 | CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" 1164 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y 1165 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set 1166 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set 1167 | CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y 1168 | CONFIG_SUPPORT_TERMIOS=y 1169 | CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 1170 | CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 1171 | # End of deprecated options 1172 | -------------------------------------------------------------------------------- /active_ap/sdkconfig.old: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated file. DO NOT EDIT. 3 | # Espressif IoT Development Framework (ESP-IDF) Project Configuration 4 | # 5 | CONFIG_IDF_CMAKE=y 6 | CONFIG_IDF_TARGET="esp32" 7 | CONFIG_IDF_TARGET_ESP32=y 8 | CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 9 | 10 | # 11 | # SDK tool configuration 12 | # 13 | CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-" 14 | # CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set 15 | # end of SDK tool configuration 16 | 17 | # 18 | # Build type 19 | # 20 | CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y 21 | # CONFIG_APP_BUILD_TYPE_ELF_RAM is not set 22 | CONFIG_APP_BUILD_GENERATE_BINARIES=y 23 | CONFIG_APP_BUILD_BOOTLOADER=y 24 | CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y 25 | # end of Build type 26 | 27 | # 28 | # Application manager 29 | # 30 | CONFIG_APP_COMPILE_TIME_DATE=y 31 | # CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set 32 | # CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set 33 | # CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set 34 | CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 35 | # end of Application manager 36 | 37 | # 38 | # Bootloader config 39 | # 40 | CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y 41 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set 42 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set 43 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set 44 | # CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set 45 | # CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set 46 | # CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set 47 | CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y 48 | # CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set 49 | # CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set 50 | CONFIG_BOOTLOADER_LOG_LEVEL=3 51 | # CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set 52 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y 53 | # CONFIG_BOOTLOADER_FACTORY_RESET is not set 54 | # CONFIG_BOOTLOADER_APP_TEST is not set 55 | CONFIG_BOOTLOADER_WDT_ENABLE=y 56 | # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set 57 | CONFIG_BOOTLOADER_WDT_TIME_MS=9000 58 | # CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set 59 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set 60 | CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 61 | # CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set 62 | # end of Bootloader config 63 | 64 | # 65 | # Security features 66 | # 67 | # CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set 68 | # CONFIG_SECURE_BOOT is not set 69 | # CONFIG_SECURE_FLASH_ENC_ENABLED is not set 70 | # end of Security features 71 | 72 | # 73 | # Serial flasher config 74 | # 75 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 76 | CONFIG_ESPTOOLPY_WITH_STUB=y 77 | # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set 78 | # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set 79 | CONFIG_ESPTOOLPY_FLASHMODE_DIO=y 80 | # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set 81 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 82 | # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set 83 | CONFIG_ESPTOOLPY_FLASHFREQ_40M=y 84 | # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set 85 | # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set 86 | CONFIG_ESPTOOLPY_FLASHFREQ="40m" 87 | # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set 88 | CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y 89 | # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set 90 | # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set 91 | # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set 92 | CONFIG_ESPTOOLPY_FLASHSIZE="2MB" 93 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y 94 | CONFIG_ESPTOOLPY_BEFORE_RESET=y 95 | # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set 96 | CONFIG_ESPTOOLPY_BEFORE="default_reset" 97 | CONFIG_ESPTOOLPY_AFTER_RESET=y 98 | # CONFIG_ESPTOOLPY_AFTER_NORESET is not set 99 | CONFIG_ESPTOOLPY_AFTER="hard_reset" 100 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set 101 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set 102 | CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y 103 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set 104 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set 105 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set 106 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set 107 | CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 108 | CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 109 | # end of Serial flasher config 110 | 111 | # 112 | # Partition Table 113 | # 114 | CONFIG_PARTITION_TABLE_SINGLE_APP=y 115 | # CONFIG_PARTITION_TABLE_TWO_OTA is not set 116 | # CONFIG_PARTITION_TABLE_CUSTOM is not set 117 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" 118 | CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" 119 | CONFIG_PARTITION_TABLE_OFFSET=0x8000 120 | CONFIG_PARTITION_TABLE_MD5=y 121 | # end of Partition Table 122 | 123 | # 124 | # ESP32 CSI Tool Config 125 | # 126 | CONFIG_ESP_WIFI_SSID="myssid" 127 | CONFIG_ESP_WIFI_PASSWORD="mypassword" 128 | CONFIG_SHOULD_COLLECT_CSI=y 129 | CONFIG_SEND_CSI_TO_SERIAL=y 130 | CONFIG_SEND_CSI_TO_SD=y 131 | # end of ESP32 CSI Tool Config 132 | 133 | # 134 | # Compiler options 135 | # 136 | CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y 137 | # CONFIG_COMPILER_OPTIMIZATION_SIZE is not set 138 | # CONFIG_COMPILER_OPTIMIZATION_PERF is not set 139 | # CONFIG_COMPILER_OPTIMIZATION_NONE is not set 140 | CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y 141 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set 142 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set 143 | # CONFIG_COMPILER_CXX_EXCEPTIONS is not set 144 | # CONFIG_COMPILER_CXX_RTTI is not set 145 | CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y 146 | # CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set 147 | # CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set 148 | # CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set 149 | # CONFIG_COMPILER_WARN_WRITE_STRINGS is not set 150 | # CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set 151 | # end of Compiler options 152 | 153 | # 154 | # Component config 155 | # 156 | 157 | # 158 | # Application Level Tracing 159 | # 160 | # CONFIG_APPTRACE_DEST_TRAX is not set 161 | CONFIG_APPTRACE_DEST_NONE=y 162 | CONFIG_APPTRACE_LOCK_ENABLE=y 163 | # end of Application Level Tracing 164 | 165 | # 166 | # Bluetooth 167 | # 168 | # CONFIG_BT_ENABLED is not set 169 | CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0 170 | CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0 171 | CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0 172 | CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=0 173 | CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=0 174 | CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0 175 | CONFIG_BTDM_CTRL_PINNED_TO_CORE=0 176 | CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1 177 | CONFIG_BT_RESERVE_DRAM=0 178 | # end of Bluetooth 179 | 180 | # 181 | # CoAP Configuration 182 | # 183 | CONFIG_COAP_MBEDTLS_PSK=y 184 | # CONFIG_COAP_MBEDTLS_PKI is not set 185 | # CONFIG_COAP_MBEDTLS_DEBUG is not set 186 | CONFIG_COAP_LOG_DEFAULT_LEVEL=0 187 | # end of CoAP Configuration 188 | 189 | # 190 | # Driver configurations 191 | # 192 | 193 | # 194 | # ADC configuration 195 | # 196 | # CONFIG_ADC_FORCE_XPD_FSM is not set 197 | CONFIG_ADC_DISABLE_DAC=y 198 | # end of ADC configuration 199 | 200 | # 201 | # SPI configuration 202 | # 203 | # CONFIG_SPI_MASTER_IN_IRAM is not set 204 | CONFIG_SPI_MASTER_ISR_IN_IRAM=y 205 | # CONFIG_SPI_SLAVE_IN_IRAM is not set 206 | CONFIG_SPI_SLAVE_ISR_IN_IRAM=y 207 | # end of SPI configuration 208 | 209 | # 210 | # UART configuration 211 | # 212 | # CONFIG_UART_ISR_IN_IRAM is not set 213 | # end of UART configuration 214 | 215 | # 216 | # RTCIO configuration 217 | # 218 | # CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set 219 | # end of RTCIO configuration 220 | # end of Driver configurations 221 | 222 | # 223 | # eFuse Bit Manager 224 | # 225 | # CONFIG_EFUSE_CUSTOM_TABLE is not set 226 | # CONFIG_EFUSE_VIRTUAL is not set 227 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set 228 | CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y 229 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set 230 | CONFIG_EFUSE_MAX_BLK_LEN=192 231 | # end of eFuse Bit Manager 232 | 233 | # 234 | # ESP-TLS 235 | # 236 | CONFIG_ESP_TLS_USING_MBEDTLS=y 237 | # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set 238 | # CONFIG_ESP_TLS_SERVER is not set 239 | # CONFIG_ESP_TLS_PSK_VERIFICATION is not set 240 | # end of ESP-TLS 241 | 242 | # 243 | # ESP32-specific 244 | # 245 | CONFIG_ESP32_REV_MIN_0=y 246 | # CONFIG_ESP32_REV_MIN_1 is not set 247 | # CONFIG_ESP32_REV_MIN_2 is not set 248 | # CONFIG_ESP32_REV_MIN_3 is not set 249 | CONFIG_ESP32_REV_MIN=0 250 | CONFIG_ESP32_DPORT_WORKAROUND=y 251 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set 252 | CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y 253 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_240 is not set 254 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160 255 | # CONFIG_ESP32_SPIRAM_SUPPORT is not set 256 | # CONFIG_ESP32_TRAX is not set 257 | CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 258 | # CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set 259 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y 260 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 261 | # CONFIG_ESP32_ULP_COPROC_ENABLED is not set 262 | CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 263 | CONFIG_ESP32_DEBUG_OCDAWARE=y 264 | CONFIG_ESP32_BROWNOUT_DET=y 265 | CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y 266 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set 267 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set 268 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set 269 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set 270 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set 271 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set 272 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set 273 | CONFIG_ESP32_BROWNOUT_DET_LVL=0 274 | CONFIG_ESP32_REDUCE_PHY_TX_POWER=y 275 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y 276 | # CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set 277 | # CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set 278 | # CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set 279 | CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y 280 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set 281 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set 282 | # CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set 283 | CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 284 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 285 | CONFIG_ESP32_XTAL_FREQ_40=y 286 | # CONFIG_ESP32_XTAL_FREQ_26 is not set 287 | # CONFIG_ESP32_XTAL_FREQ_AUTO is not set 288 | CONFIG_ESP32_XTAL_FREQ=40 289 | # CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set 290 | # CONFIG_ESP32_NO_BLOBS is not set 291 | # CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set 292 | # CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set 293 | CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 294 | # end of ESP32-specific 295 | 296 | # 297 | # Power Management 298 | # 299 | # CONFIG_PM_ENABLE is not set 300 | # end of Power Management 301 | 302 | # 303 | # ADC-Calibration 304 | # 305 | CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y 306 | CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y 307 | CONFIG_ADC_CAL_LUT_ENABLE=y 308 | # end of ADC-Calibration 309 | 310 | # 311 | # Common ESP-related 312 | # 313 | CONFIG_ESP_ERR_TO_NAME_LOOKUP=y 314 | CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 315 | CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 316 | CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584 317 | CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 318 | CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y 319 | CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 320 | CONFIG_ESP_CONSOLE_UART_DEFAULT=y 321 | # CONFIG_ESP_CONSOLE_UART_CUSTOM is not set 322 | # CONFIG_ESP_CONSOLE_UART_NONE is not set 323 | CONFIG_ESP_CONSOLE_UART_NUM=0 324 | CONFIG_ESP_CONSOLE_UART_TX_GPIO=1 325 | CONFIG_ESP_CONSOLE_UART_RX_GPIO=3 326 | CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 327 | CONFIG_ESP_INT_WDT=y 328 | CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 329 | CONFIG_ESP_INT_WDT_CHECK_CPU1=y 330 | CONFIG_ESP_TASK_WDT=y 331 | # CONFIG_ESP_TASK_WDT_PANIC is not set 332 | CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 333 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 334 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 335 | # CONFIG_ESP_PANIC_HANDLER_IRAM is not set 336 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y 337 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y 338 | CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y 339 | CONFIG_ESP_MAC_ADDR_UNIVERSE_BT_OFFSET=2 340 | CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y 341 | # end of Common ESP-related 342 | 343 | # 344 | # Ethernet 345 | # 346 | CONFIG_ETH_ENABLED=y 347 | CONFIG_ETH_USE_ESP32_EMAC=y 348 | CONFIG_ETH_PHY_INTERFACE_RMII=y 349 | # CONFIG_ETH_PHY_INTERFACE_MII is not set 350 | CONFIG_ETH_RMII_CLK_INPUT=y 351 | # CONFIG_ETH_RMII_CLK_OUTPUT is not set 352 | CONFIG_ETH_RMII_CLK_IN_GPIO=0 353 | CONFIG_ETH_DMA_BUFFER_SIZE=512 354 | CONFIG_ETH_DMA_RX_BUFFER_NUM=10 355 | CONFIG_ETH_DMA_TX_BUFFER_NUM=10 356 | CONFIG_ETH_USE_SPI_ETHERNET=y 357 | # CONFIG_ETH_SPI_ETHERNET_DM9051 is not set 358 | # CONFIG_ETH_USE_OPENETH is not set 359 | # end of Ethernet 360 | 361 | # 362 | # Event Loop Library 363 | # 364 | # CONFIG_ESP_EVENT_LOOP_PROFILING is not set 365 | CONFIG_ESP_EVENT_POST_FROM_ISR=y 366 | CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y 367 | # end of Event Loop Library 368 | 369 | # 370 | # GDB Stub 371 | # 372 | # end of GDB Stub 373 | 374 | # 375 | # ESP HTTP client 376 | # 377 | CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y 378 | # CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set 379 | # end of ESP HTTP client 380 | 381 | # 382 | # HTTP Server 383 | # 384 | CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 385 | CONFIG_HTTPD_MAX_URI_LEN=512 386 | CONFIG_HTTPD_ERR_RESP_NO_DELAY=y 387 | CONFIG_HTTPD_PURGE_BUF_LEN=32 388 | # CONFIG_HTTPD_LOG_PURGE_DATA is not set 389 | # CONFIG_HTTPD_WS_SUPPORT is not set 390 | # end of HTTP Server 391 | 392 | # 393 | # ESP HTTPS OTA 394 | # 395 | # CONFIG_OTA_ALLOW_HTTP is not set 396 | # end of ESP HTTPS OTA 397 | 398 | # 399 | # ESP HTTPS server 400 | # 401 | # CONFIG_ESP_HTTPS_SERVER_ENABLE is not set 402 | # end of ESP HTTPS server 403 | 404 | # 405 | # ESP NETIF Adapter 406 | # 407 | CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 408 | CONFIG_ESP_NETIF_TCPIP_LWIP=y 409 | # CONFIG_ESP_NETIF_LOOPBACK is not set 410 | CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y 411 | # end of ESP NETIF Adapter 412 | 413 | # 414 | # ESP System Settings 415 | # 416 | # CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set 417 | CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y 418 | # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set 419 | # CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set 420 | # end of ESP System Settings 421 | 422 | # 423 | # High resolution timer (esp_timer) 424 | # 425 | # CONFIG_ESP_TIMER_PROFILING is not set 426 | CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 427 | # CONFIG_ESP_TIMER_IMPL_FRC2 is not set 428 | CONFIG_ESP_TIMER_IMPL_TG0_LAC=y 429 | # end of High resolution timer (esp_timer) 430 | 431 | # 432 | # Wi-Fi 433 | # 434 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 435 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 436 | # CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set 437 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y 438 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 439 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 440 | CONFIG_ESP32_WIFI_CSI_ENABLED=y 441 | CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y 442 | CONFIG_ESP32_WIFI_TX_BA_WIN=6 443 | CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y 444 | CONFIG_ESP32_WIFI_RX_BA_WIN=6 445 | CONFIG_ESP32_WIFI_NVS_ENABLED=y 446 | CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y 447 | # CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set 448 | CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 449 | CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 450 | # CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE is not set 451 | CONFIG_ESP32_WIFI_IRAM_OPT=y 452 | CONFIG_ESP32_WIFI_RX_IRAM_OPT=y 453 | CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y 454 | # end of Wi-Fi 455 | 456 | # 457 | # PHY 458 | # 459 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y 460 | # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set 461 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 462 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 463 | # end of PHY 464 | 465 | # 466 | # Core dump 467 | # 468 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set 469 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set 470 | CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y 471 | # end of Core dump 472 | 473 | # 474 | # FAT Filesystem support 475 | # 476 | # CONFIG_FATFS_CODEPAGE_DYNAMIC is not set 477 | CONFIG_FATFS_CODEPAGE_437=y 478 | # CONFIG_FATFS_CODEPAGE_720 is not set 479 | # CONFIG_FATFS_CODEPAGE_737 is not set 480 | # CONFIG_FATFS_CODEPAGE_771 is not set 481 | # CONFIG_FATFS_CODEPAGE_775 is not set 482 | # CONFIG_FATFS_CODEPAGE_850 is not set 483 | # CONFIG_FATFS_CODEPAGE_852 is not set 484 | # CONFIG_FATFS_CODEPAGE_855 is not set 485 | # CONFIG_FATFS_CODEPAGE_857 is not set 486 | # CONFIG_FATFS_CODEPAGE_860 is not set 487 | # CONFIG_FATFS_CODEPAGE_861 is not set 488 | # CONFIG_FATFS_CODEPAGE_862 is not set 489 | # CONFIG_FATFS_CODEPAGE_863 is not set 490 | # CONFIG_FATFS_CODEPAGE_864 is not set 491 | # CONFIG_FATFS_CODEPAGE_865 is not set 492 | # CONFIG_FATFS_CODEPAGE_866 is not set 493 | # CONFIG_FATFS_CODEPAGE_869 is not set 494 | # CONFIG_FATFS_CODEPAGE_932 is not set 495 | # CONFIG_FATFS_CODEPAGE_936 is not set 496 | # CONFIG_FATFS_CODEPAGE_949 is not set 497 | # CONFIG_FATFS_CODEPAGE_950 is not set 498 | CONFIG_FATFS_CODEPAGE=437 499 | CONFIG_FATFS_LFN_NONE=y 500 | # CONFIG_FATFS_LFN_HEAP is not set 501 | # CONFIG_FATFS_LFN_STACK is not set 502 | CONFIG_FATFS_FS_LOCK=0 503 | CONFIG_FATFS_TIMEOUT_MS=10000 504 | CONFIG_FATFS_PER_FILE_CACHE=y 505 | # end of FAT Filesystem support 506 | 507 | # 508 | # Modbus configuration 509 | # 510 | CONFIG_FMB_COMM_MODE_RTU_EN=y 511 | CONFIG_FMB_COMM_MODE_ASCII_EN=y 512 | CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 513 | CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 514 | CONFIG_FMB_QUEUE_LENGTH=20 515 | CONFIG_FMB_SERIAL_TASK_STACK_SIZE=2048 516 | CONFIG_FMB_SERIAL_BUF_SIZE=256 517 | CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 518 | CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 519 | CONFIG_FMB_SERIAL_TASK_PRIO=10 520 | # CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set 521 | CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 522 | CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 523 | CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 524 | CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 525 | CONFIG_FMB_TIMER_PORT_ENABLED=y 526 | CONFIG_FMB_TIMER_GROUP=0 527 | CONFIG_FMB_TIMER_INDEX=0 528 | # CONFIG_FMB_TIMER_ISR_IN_IRAM is not set 529 | # end of Modbus configuration 530 | 531 | # 532 | # FreeRTOS 533 | # 534 | # CONFIG_FREERTOS_UNICORE is not set 535 | CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF 536 | CONFIG_FREERTOS_CORETIMER_0=y 537 | # CONFIG_FREERTOS_CORETIMER_1 is not set 538 | CONFIG_FREERTOS_HZ=100 539 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y 540 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set 541 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set 542 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y 543 | # CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set 544 | CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y 545 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 546 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 547 | # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set 548 | # CONFIG_FREERTOS_ASSERT_DISABLE is not set 549 | CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 550 | CONFIG_FREERTOS_ISR_STACKSIZE=1536 551 | # CONFIG_FREERTOS_LEGACY_HOOKS is not set 552 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 553 | # CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION is not set 554 | CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 555 | CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 556 | CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 557 | CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 558 | # CONFIG_FREERTOS_USE_TRACE_FACILITY is not set 559 | # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set 560 | CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y 561 | CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y 562 | # CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set 563 | CONFIG_FREERTOS_DEBUG_OCDAWARE=y 564 | # CONFIG_FREERTOS_FPU_IN_ISR is not set 565 | # end of FreeRTOS 566 | 567 | # 568 | # Heap memory debugging 569 | # 570 | CONFIG_HEAP_POISONING_DISABLED=y 571 | # CONFIG_HEAP_POISONING_LIGHT is not set 572 | # CONFIG_HEAP_POISONING_COMPREHENSIVE is not set 573 | CONFIG_HEAP_TRACING_OFF=y 574 | # CONFIG_HEAP_TRACING_STANDALONE is not set 575 | # CONFIG_HEAP_TRACING_TOHOST is not set 576 | # CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set 577 | # end of Heap memory debugging 578 | 579 | # 580 | # jsmn 581 | # 582 | # CONFIG_JSMN_PARENT_LINKS is not set 583 | # CONFIG_JSMN_STRICT is not set 584 | # end of jsmn 585 | 586 | # 587 | # libsodium 588 | # 589 | # end of libsodium 590 | 591 | # 592 | # Log output 593 | # 594 | # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set 595 | # CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set 596 | # CONFIG_LOG_DEFAULT_LEVEL_WARN is not set 597 | CONFIG_LOG_DEFAULT_LEVEL_INFO=y 598 | # CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set 599 | # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set 600 | CONFIG_LOG_DEFAULT_LEVEL=3 601 | CONFIG_LOG_COLORS=y 602 | CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y 603 | # CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set 604 | # end of Log output 605 | 606 | # 607 | # LWIP 608 | # 609 | CONFIG_LWIP_LOCAL_HOSTNAME="espressif" 610 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y 611 | # CONFIG_LWIP_L2_TO_L3_COPY is not set 612 | # CONFIG_LWIP_IRAM_OPTIMIZATION is not set 613 | CONFIG_LWIP_TIMERS_ONDEMAND=y 614 | CONFIG_LWIP_MAX_SOCKETS=10 615 | # CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set 616 | # CONFIG_LWIP_SO_LINGER is not set 617 | CONFIG_LWIP_SO_REUSE=y 618 | CONFIG_LWIP_SO_REUSE_RXTOALL=y 619 | # CONFIG_LWIP_SO_RCVBUF is not set 620 | # CONFIG_LWIP_NETBUF_RECVINFO is not set 621 | CONFIG_LWIP_IP4_FRAG=y 622 | CONFIG_LWIP_IP6_FRAG=y 623 | # CONFIG_LWIP_IP4_REASSEMBLY is not set 624 | # CONFIG_LWIP_IP6_REASSEMBLY is not set 625 | # CONFIG_LWIP_IP_FORWARD is not set 626 | # CONFIG_LWIP_STATS is not set 627 | # CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set 628 | CONFIG_LWIP_ESP_GRATUITOUS_ARP=y 629 | CONFIG_LWIP_GARP_TMR_INTERVAL=60 630 | CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 631 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y 632 | # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set 633 | 634 | # 635 | # DHCP server 636 | # 637 | CONFIG_LWIP_DHCPS_LEASE_UNIT=60 638 | CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 639 | # end of DHCP server 640 | 641 | # CONFIG_LWIP_AUTOIP is not set 642 | # CONFIG_LWIP_IPV6_AUTOCONFIG is not set 643 | CONFIG_LWIP_NETIF_LOOPBACK=y 644 | CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 645 | 646 | # 647 | # TCP 648 | # 649 | CONFIG_LWIP_MAX_ACTIVE_TCP=16 650 | CONFIG_LWIP_MAX_LISTENING_TCP=16 651 | CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y 652 | CONFIG_LWIP_TCP_MAXRTX=12 653 | CONFIG_LWIP_TCP_SYNMAXRTX=12 654 | CONFIG_LWIP_TCP_MSS=1440 655 | CONFIG_LWIP_TCP_TMR_INTERVAL=250 656 | CONFIG_LWIP_TCP_MSL=60000 657 | CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 658 | CONFIG_LWIP_TCP_WND_DEFAULT=5744 659 | CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 660 | CONFIG_LWIP_TCP_QUEUE_OOSEQ=y 661 | # CONFIG_LWIP_TCP_SACK_OUT is not set 662 | # CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set 663 | CONFIG_LWIP_TCP_OVERSIZE_MSS=y 664 | # CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set 665 | # CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set 666 | CONFIG_LWIP_TCP_RTO_TIME=1500 667 | # end of TCP 668 | 669 | # 670 | # UDP 671 | # 672 | CONFIG_LWIP_MAX_UDP_PCBS=16 673 | CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 674 | # end of UDP 675 | 676 | CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 677 | CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 678 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set 679 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set 680 | CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF 681 | # CONFIG_LWIP_PPP_SUPPORT is not set 682 | CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 683 | CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 684 | 685 | # 686 | # ICMP 687 | # 688 | # CONFIG_LWIP_MULTICAST_PING is not set 689 | # CONFIG_LWIP_BROADCAST_PING is not set 690 | # end of ICMP 691 | 692 | # 693 | # LWIP RAW API 694 | # 695 | CONFIG_LWIP_MAX_RAW_PCBS=16 696 | # end of LWIP RAW API 697 | 698 | # 699 | # SNTP 700 | # 701 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 702 | CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 703 | # end of SNTP 704 | 705 | CONFIG_LWIP_ESP_LWIP_ASSERT=y 706 | # end of LWIP 707 | 708 | # 709 | # mbedTLS 710 | # 711 | CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y 712 | # CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set 713 | # CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set 714 | CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y 715 | CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 716 | CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 717 | # CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set 718 | # CONFIG_MBEDTLS_DEBUG is not set 719 | 720 | # 721 | # Certificate Bundle 722 | # 723 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y 724 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y 725 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set 726 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set 727 | # CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set 728 | # end of Certificate Bundle 729 | 730 | # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set 731 | # CONFIG_MBEDTLS_CMAC_C is not set 732 | CONFIG_MBEDTLS_HARDWARE_AES=y 733 | CONFIG_MBEDTLS_HARDWARE_MPI=y 734 | CONFIG_MBEDTLS_HARDWARE_SHA=y 735 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set 736 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set 737 | CONFIG_MBEDTLS_HAVE_TIME=y 738 | # CONFIG_MBEDTLS_HAVE_TIME_DATE is not set 739 | CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y 740 | CONFIG_MBEDTLS_SHA512_C=y 741 | CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y 742 | # CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set 743 | # CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set 744 | # CONFIG_MBEDTLS_TLS_DISABLED is not set 745 | CONFIG_MBEDTLS_TLS_SERVER=y 746 | CONFIG_MBEDTLS_TLS_CLIENT=y 747 | CONFIG_MBEDTLS_TLS_ENABLED=y 748 | 749 | # 750 | # TLS Key Exchange Methods 751 | # 752 | # CONFIG_MBEDTLS_PSK_MODES is not set 753 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y 754 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y 755 | CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y 756 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y 757 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y 758 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y 759 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y 760 | # end of TLS Key Exchange Methods 761 | 762 | CONFIG_MBEDTLS_SSL_RENEGOTIATION=y 763 | # CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set 764 | CONFIG_MBEDTLS_SSL_PROTO_TLS1=y 765 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y 766 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y 767 | # CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set 768 | CONFIG_MBEDTLS_SSL_ALPN=y 769 | CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y 770 | CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y 771 | 772 | # 773 | # Symmetric Ciphers 774 | # 775 | CONFIG_MBEDTLS_AES_C=y 776 | # CONFIG_MBEDTLS_CAMELLIA_C is not set 777 | # CONFIG_MBEDTLS_DES_C is not set 778 | CONFIG_MBEDTLS_RC4_DISABLED=y 779 | # CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set 780 | # CONFIG_MBEDTLS_RC4_ENABLED is not set 781 | # CONFIG_MBEDTLS_BLOWFISH_C is not set 782 | # CONFIG_MBEDTLS_XTEA_C is not set 783 | CONFIG_MBEDTLS_CCM_C=y 784 | CONFIG_MBEDTLS_GCM_C=y 785 | # end of Symmetric Ciphers 786 | 787 | # CONFIG_MBEDTLS_RIPEMD160_C is not set 788 | 789 | # 790 | # Certificates 791 | # 792 | CONFIG_MBEDTLS_PEM_PARSE_C=y 793 | CONFIG_MBEDTLS_PEM_WRITE_C=y 794 | CONFIG_MBEDTLS_X509_CRL_PARSE_C=y 795 | CONFIG_MBEDTLS_X509_CSR_PARSE_C=y 796 | # end of Certificates 797 | 798 | CONFIG_MBEDTLS_ECP_C=y 799 | CONFIG_MBEDTLS_ECDH_C=y 800 | CONFIG_MBEDTLS_ECDSA_C=y 801 | # CONFIG_MBEDTLS_ECJPAKE_C is not set 802 | CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y 803 | CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y 804 | CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y 805 | CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y 806 | CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y 807 | CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y 808 | CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y 809 | CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y 810 | CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y 811 | CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y 812 | CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y 813 | CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y 814 | CONFIG_MBEDTLS_ECP_NIST_OPTIM=y 815 | # CONFIG_MBEDTLS_POLY1305_C is not set 816 | # CONFIG_MBEDTLS_CHACHA20_C is not set 817 | # CONFIG_MBEDTLS_HKDF_C is not set 818 | # CONFIG_MBEDTLS_THREADING_C is not set 819 | # CONFIG_MBEDTLS_SECURITY_RISKS is not set 820 | # end of mbedTLS 821 | 822 | # 823 | # mDNS 824 | # 825 | CONFIG_MDNS_MAX_SERVICES=10 826 | CONFIG_MDNS_TASK_PRIORITY=1 827 | CONFIG_MDNS_TASK_STACK_SIZE=4096 828 | # CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set 829 | CONFIG_MDNS_TASK_AFFINITY_CPU0=y 830 | # CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set 831 | CONFIG_MDNS_TASK_AFFINITY=0x0 832 | CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 833 | CONFIG_MDNS_TIMER_PERIOD_MS=100 834 | # end of mDNS 835 | 836 | # 837 | # ESP-MQTT Configurations 838 | # 839 | CONFIG_MQTT_PROTOCOL_311=y 840 | CONFIG_MQTT_TRANSPORT_SSL=y 841 | CONFIG_MQTT_TRANSPORT_WEBSOCKET=y 842 | CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y 843 | # CONFIG_MQTT_USE_CUSTOM_CONFIG is not set 844 | # CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set 845 | # CONFIG_MQTT_CUSTOM_OUTBOX is not set 846 | # end of ESP-MQTT Configurations 847 | 848 | # 849 | # Newlib 850 | # 851 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y 852 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set 853 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set 854 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set 855 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set 856 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y 857 | # CONFIG_NEWLIB_NANO_FORMAT is not set 858 | # end of Newlib 859 | 860 | # 861 | # NVS 862 | # 863 | # end of NVS 864 | 865 | # 866 | # OpenSSL 867 | # 868 | # CONFIG_OPENSSL_DEBUG is not set 869 | # CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set 870 | CONFIG_OPENSSL_ASSERT_EXIT=y 871 | # end of OpenSSL 872 | 873 | # 874 | # PThreads 875 | # 876 | CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 877 | CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 878 | CONFIG_PTHREAD_STACK_MIN=768 879 | CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y 880 | # CONFIG_PTHREAD_DEFAULT_CORE_0 is not set 881 | # CONFIG_PTHREAD_DEFAULT_CORE_1 is not set 882 | CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 883 | CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" 884 | # end of PThreads 885 | 886 | # 887 | # SPI Flash driver 888 | # 889 | # CONFIG_SPI_FLASH_VERIFY_WRITE is not set 890 | # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set 891 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y 892 | CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y 893 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set 894 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set 895 | # CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set 896 | # CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set 897 | # CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set 898 | CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y 899 | CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 900 | CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 901 | 902 | # 903 | # Auto-detect flash chips 904 | # 905 | CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y 906 | CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y 907 | CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y 908 | # end of Auto-detect flash chips 909 | # end of SPI Flash driver 910 | 911 | # 912 | # SPIFFS Configuration 913 | # 914 | CONFIG_SPIFFS_MAX_PARTITIONS=3 915 | 916 | # 917 | # SPIFFS Cache Configuration 918 | # 919 | CONFIG_SPIFFS_CACHE=y 920 | CONFIG_SPIFFS_CACHE_WR=y 921 | # CONFIG_SPIFFS_CACHE_STATS is not set 922 | # end of SPIFFS Cache Configuration 923 | 924 | CONFIG_SPIFFS_PAGE_CHECK=y 925 | CONFIG_SPIFFS_GC_MAX_RUNS=10 926 | # CONFIG_SPIFFS_GC_STATS is not set 927 | CONFIG_SPIFFS_PAGE_SIZE=256 928 | CONFIG_SPIFFS_OBJ_NAME_LEN=32 929 | # CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set 930 | CONFIG_SPIFFS_USE_MAGIC=y 931 | CONFIG_SPIFFS_USE_MAGIC_LENGTH=y 932 | CONFIG_SPIFFS_META_LENGTH=4 933 | CONFIG_SPIFFS_USE_MTIME=y 934 | 935 | # 936 | # Debug Configuration 937 | # 938 | # CONFIG_SPIFFS_DBG is not set 939 | # CONFIG_SPIFFS_API_DBG is not set 940 | # CONFIG_SPIFFS_GC_DBG is not set 941 | # CONFIG_SPIFFS_CACHE_DBG is not set 942 | # CONFIG_SPIFFS_CHECK_DBG is not set 943 | # CONFIG_SPIFFS_TEST_VISUALISATION is not set 944 | # end of Debug Configuration 945 | # end of SPIFFS Configuration 946 | 947 | # 948 | # TinyUSB 949 | # 950 | 951 | # 952 | # Descriptor configuration 953 | # 954 | CONFIG_USB_DESC_CUSTOM_VID=0x1234 955 | CONFIG_USB_DESC_CUSTOM_PID=0x5678 956 | # end of Descriptor configuration 957 | # end of TinyUSB 958 | 959 | # 960 | # Unity unit testing library 961 | # 962 | CONFIG_UNITY_ENABLE_FLOAT=y 963 | CONFIG_UNITY_ENABLE_DOUBLE=y 964 | # CONFIG_UNITY_ENABLE_COLOR is not set 965 | CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y 966 | # CONFIG_UNITY_ENABLE_FIXTURE is not set 967 | # CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set 968 | # end of Unity unit testing library 969 | 970 | # 971 | # Virtual file system 972 | # 973 | CONFIG_VFS_SUPPORT_IO=y 974 | CONFIG_VFS_SUPPORT_DIR=y 975 | CONFIG_VFS_SUPPORT_SELECT=y 976 | CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y 977 | CONFIG_VFS_SUPPORT_TERMIOS=y 978 | 979 | # 980 | # Host File System I/O (Semihosting) 981 | # 982 | CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 983 | CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 984 | # end of Host File System I/O (Semihosting) 985 | # end of Virtual file system 986 | 987 | # 988 | # Wear Levelling 989 | # 990 | # CONFIG_WL_SECTOR_SIZE_512 is not set 991 | CONFIG_WL_SECTOR_SIZE_4096=y 992 | CONFIG_WL_SECTOR_SIZE=4096 993 | # end of Wear Levelling 994 | 995 | # 996 | # Wi-Fi Provisioning Manager 997 | # 998 | CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 999 | CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 1000 | # end of Wi-Fi Provisioning Manager 1001 | 1002 | # 1003 | # Supplicant 1004 | # 1005 | CONFIG_WPA_MBEDTLS_CRYPTO=y 1006 | # CONFIG_WPA_DEBUG_PRINT is not set 1007 | # CONFIG_WPA_TESTING_OPTIONS is not set 1008 | # CONFIG_WPA_WPS_WARS is not set 1009 | # end of Supplicant 1010 | # end of Component config 1011 | 1012 | # 1013 | # Compatibility options 1014 | # 1015 | # CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set 1016 | # end of Compatibility options 1017 | 1018 | # Deprecated options for backward compatibility 1019 | CONFIG_TOOLPREFIX="xtensa-esp32-elf-" 1020 | # CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set 1021 | # CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set 1022 | # CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set 1023 | CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y 1024 | # CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set 1025 | # CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set 1026 | CONFIG_LOG_BOOTLOADER_LEVEL=3 1027 | # CONFIG_APP_ROLLBACK_ENABLE is not set 1028 | # CONFIG_FLASH_ENCRYPTION_ENABLED is not set 1029 | # CONFIG_FLASHMODE_QIO is not set 1030 | # CONFIG_FLASHMODE_QOUT is not set 1031 | CONFIG_FLASHMODE_DIO=y 1032 | # CONFIG_FLASHMODE_DOUT is not set 1033 | # CONFIG_MONITOR_BAUD_9600B is not set 1034 | # CONFIG_MONITOR_BAUD_57600B is not set 1035 | CONFIG_MONITOR_BAUD_115200B=y 1036 | # CONFIG_MONITOR_BAUD_230400B is not set 1037 | # CONFIG_MONITOR_BAUD_921600B is not set 1038 | # CONFIG_MONITOR_BAUD_2MB is not set 1039 | # CONFIG_MONITOR_BAUD_OTHER is not set 1040 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200 1041 | CONFIG_MONITOR_BAUD=115200 1042 | CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y 1043 | # CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set 1044 | CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y 1045 | # CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set 1046 | # CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set 1047 | # CONFIG_CXX_EXCEPTIONS is not set 1048 | CONFIG_STACK_CHECK_NONE=y 1049 | # CONFIG_STACK_CHECK_NORM is not set 1050 | # CONFIG_STACK_CHECK_STRONG is not set 1051 | # CONFIG_STACK_CHECK_ALL is not set 1052 | # CONFIG_WARN_WRITE_STRINGS is not set 1053 | # CONFIG_DISABLE_GCC8_WARNINGS is not set 1054 | # CONFIG_ESP32_APPTRACE_DEST_TRAX is not set 1055 | CONFIG_ESP32_APPTRACE_DEST_NONE=y 1056 | CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y 1057 | CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0 1058 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0 1059 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 1060 | CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 1061 | CONFIG_ADC2_DISABLE_DAC=y 1062 | # CONFIG_SPIRAM_SUPPORT is not set 1063 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0 1064 | # CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set 1065 | CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y 1066 | CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 1067 | # CONFIG_ULP_COPROC_ENABLED is not set 1068 | CONFIG_ULP_COPROC_RESERVE_MEM=0 1069 | CONFIG_BROWNOUT_DET=y 1070 | CONFIG_BROWNOUT_DET_LVL_SEL_0=y 1071 | # CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set 1072 | # CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set 1073 | # CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set 1074 | # CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set 1075 | # CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set 1076 | # CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set 1077 | # CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set 1078 | CONFIG_BROWNOUT_DET_LVL=0 1079 | CONFIG_REDUCE_PHY_TX_POWER=y 1080 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y 1081 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set 1082 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set 1083 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set 1084 | # CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set 1085 | # CONFIG_NO_BLOBS is not set 1086 | # CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set 1087 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 1088 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 1089 | CONFIG_MAIN_TASK_STACK_SIZE=3584 1090 | CONFIG_IPC_TASK_STACK_SIZE=1024 1091 | CONFIG_CONSOLE_UART_DEFAULT=y 1092 | # CONFIG_CONSOLE_UART_CUSTOM is not set 1093 | # CONFIG_CONSOLE_UART_NONE is not set 1094 | CONFIG_CONSOLE_UART_NUM=0 1095 | CONFIG_CONSOLE_UART_TX_GPIO=1 1096 | CONFIG_CONSOLE_UART_RX_GPIO=3 1097 | CONFIG_CONSOLE_UART_BAUDRATE=115200 1098 | CONFIG_INT_WDT=y 1099 | CONFIG_INT_WDT_TIMEOUT_MS=300 1100 | CONFIG_INT_WDT_CHECK_CPU1=y 1101 | CONFIG_TASK_WDT=y 1102 | # CONFIG_TASK_WDT_PANIC is not set 1103 | CONFIG_TASK_WDT_TIMEOUT_S=5 1104 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 1105 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 1106 | # CONFIG_EVENT_LOOP_PROFILING is not set 1107 | CONFIG_POST_EVENTS_FROM_ISR=y 1108 | CONFIG_POST_EVENTS_FROM_IRAM_ISR=y 1109 | # CONFIG_ESP32S2_PANIC_PRINT_HALT is not set 1110 | CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y 1111 | # CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set 1112 | # CONFIG_ESP32S2_PANIC_GDBSTUB is not set 1113 | CONFIG_TIMER_TASK_STACK_SIZE=3584 1114 | CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 1115 | CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 1116 | CONFIG_MB_QUEUE_LENGTH=20 1117 | CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048 1118 | CONFIG_MB_SERIAL_BUF_SIZE=256 1119 | CONFIG_MB_SERIAL_TASK_PRIO=10 1120 | # CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT is not set 1121 | CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 1122 | CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 1123 | CONFIG_MB_CONTROLLER_STACK_SIZE=4096 1124 | CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 1125 | CONFIG_MB_TIMER_PORT_ENABLED=y 1126 | CONFIG_MB_TIMER_GROUP=0 1127 | CONFIG_MB_TIMER_INDEX=0 1128 | # CONFIG_SUPPORT_STATIC_ALLOCATION is not set 1129 | CONFIG_TIMER_TASK_PRIORITY=1 1130 | CONFIG_TIMER_TASK_STACK_DEPTH=2048 1131 | CONFIG_TIMER_QUEUE_LENGTH=10 1132 | # CONFIG_L2_TO_L3_COPY is not set 1133 | # CONFIG_USE_ONLY_LWIP_SELECT is not set 1134 | CONFIG_ESP_GRATUITOUS_ARP=y 1135 | CONFIG_GARP_TMR_INTERVAL=60 1136 | CONFIG_TCPIP_RECVMBOX_SIZE=32 1137 | CONFIG_TCP_MAXRTX=12 1138 | CONFIG_TCP_SYNMAXRTX=12 1139 | CONFIG_TCP_MSS=1440 1140 | CONFIG_TCP_MSL=60000 1141 | CONFIG_TCP_SND_BUF_DEFAULT=5744 1142 | CONFIG_TCP_WND_DEFAULT=5744 1143 | CONFIG_TCP_RECVMBOX_SIZE=6 1144 | CONFIG_TCP_QUEUE_OOSEQ=y 1145 | # CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set 1146 | CONFIG_TCP_OVERSIZE_MSS=y 1147 | # CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set 1148 | # CONFIG_TCP_OVERSIZE_DISABLE is not set 1149 | CONFIG_UDP_RECVMBOX_SIZE=6 1150 | CONFIG_TCPIP_TASK_STACK_SIZE=3072 1151 | CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 1152 | # CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set 1153 | # CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set 1154 | CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF 1155 | # CONFIG_PPP_SUPPORT is not set 1156 | CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 1157 | CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 1158 | CONFIG_ESP32_PTHREAD_STACK_MIN=768 1159 | CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y 1160 | # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set 1161 | # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set 1162 | CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 1163 | CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" 1164 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y 1165 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set 1166 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set 1167 | CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y 1168 | CONFIG_SUPPORT_TERMIOS=y 1169 | CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 1170 | CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 1171 | # End of deprecated options 1172 | --------------------------------------------------------------------------------