├── .gitignore ├── CMakeLists.txt ├── ESP32_NAT_UI3.png ├── FlasherUI.jpg ├── Makefile ├── README.md ├── build ├── esp32 │ ├── bootloader.bin │ ├── firmware.bin │ └── partitions.bin └── esp32c3 │ ├── bootloader.bin │ ├── firmware.bin │ └── partitions.bin ├── components ├── cmd_nvs │ ├── CMakeLists.txt │ ├── cmd_nvs.c │ ├── cmd_nvs.h │ └── component.mk ├── cmd_router │ ├── CMakeLists.txt │ ├── cmd_router.c │ ├── cmd_router.h │ ├── component.mk │ └── router_globals.h └── cmd_system │ ├── CMakeLists.txt │ ├── cmd_system.c │ ├── cmd_system.h │ └── component.mk ├── main ├── CMakeLists.txt ├── Kconfig.projbuild ├── cmd_decl.h ├── component.mk ├── esp32_nat_router.c ├── http_server.c └── pages.h ├── partitions_example.csv ├── platformio.ini ├── sdkconfig ├── sdkconfig.ci.history ├── sdkconfig.ci.nohistory ├── sdkconfig.defaults └── sdkconfig.old /.gitignore: -------------------------------------------------------------------------------- 1 | build/** 2 | !build/bootloader 3 | !build/esp32_nat_router.bin 4 | !build/partitions_example.bin 5 | .pio* 6 | .vscode 7 | .vscode/* 8 | sdkconfig.* 9 | !sdkconfig.defaults -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # The following lines of boilerplate have to be in your project's CMakeLists 2 | # 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(esp32_nat_router) 7 | -------------------------------------------------------------------------------- /ESP32_NAT_UI3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paoloinverse/esp32_nat_router/d679ca514dcfd1842295b7c60f61f5e199f4b482/ESP32_NAT_UI3.png -------------------------------------------------------------------------------- /FlasherUI.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paoloinverse/esp32_nat_router/d679ca514dcfd1842295b7c60f61f5e199f4b482/FlasherUI.jpg -------------------------------------------------------------------------------- /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 := esp32_nat_router 7 | 8 | include $(IDF_PATH)/make/project.mk 9 | 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ESP32 NAT Router with WPA2 Enterprise support 2 | 3 | This is a firmware to use the ESP32 as WiFi NAT router. It can be used as 4 | - Simple range extender for an existing WiFi network 5 | - Setting up an additional WiFi network with different SSID/password for guests or IOT devices 6 | - Convert a corporate (WPA2-Enterprise) network to a regular network, for simple devices. 7 | 8 | 9 | It can achieve a bandwidth of more than 15mbps. 10 | 11 | The code is based on the [Console Component](https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/console.html#console) and the [esp-idf-nat-example](https://github.com/jonask1337/esp-idf-nat-example). 12 | 13 | ## Performance 14 | 15 | All tests used `IPv4` and the `TCP` protocol. 16 | 17 | | Board | Tools | Optimization | CPU Frequency | Throughput | Power | 18 | | ----- | ----- | ------------ | ------------- | ---------- | ----- | 19 | | `ESP32D0WDQ6` | `iperf3` | `0g` | `240MHz` | `16.0 MBits/s` | `1.6 W` | 20 | | `ESP32D0WDQ6` | `iperf3` | `0s` | `240MHz` | `10.0 MBits/s` | `1.8 W` | 21 | | `ESP32D0WDQ6` | `iperf3` | `0g` | `160MHz` | `15.2 MBits/s` | `1.4 W` | 22 | | `ESP32D0WDQ6` | `iperf3` | `0s` | `160MHz` | `14.1 MBits/s` | `1.5 W` | 23 | 24 | ## First Boot 25 | After first boot the ESP32 NAT Router will offer a WiFi network with an open AP and the ssid "ESP32_NAT_Router". Configuration can either be done via a simple web interface or via the serial console. 26 | 27 | ## Web Config Interface 28 | The web interface allows for the configuration of all parameters. Connect you PC or smartphone to the WiFi SSID "ESP32_NAT_Router" and point your browser to "http://192.168.4.1". This page should appear: 29 | 30 | 31 | 32 | First enter the appropriate values for the uplink WiFi network, the "STA Settings". Leave password blank for open networks. Click "Connect". The ESP32 reboots and will connect to your WiFi router. 33 | 34 | Now you can reconnect and reload the page and change the "Soft AP Settings". Click "Set" and again the ESP32 reboots. Now it is ready for forwarding traffic over the newly configured Soft AP. Be aware that these changes also affect the config interface, i.e. to do further configuration, connect to the ESP32 through one of the newly configured WiFi networks. 35 | 36 | If you want to enter a '+' in the web interface you have to use HTTP-style hex encoding like "Mine%2bYours". This will result in a string "Mine+Yours". With this hex encoding you can enter any byte value you like, except for 0 (for C-internal reasons). 37 | 38 | It you want to disable the web interface (e.g. for security reasons), go to the CLI and enter: 39 | ``` 40 | nvs_namespace esp32_nat 41 | nvs_set lock str -v 1 42 | ``` 43 | After restart, no webserver is started any more. You can only re-enable it with: 44 | ``` 45 | nvs_namespace esp32_nat 46 | nvs_set lock str -v 0 47 | ``` 48 | If you made a mistake and have lost all contact with the ESP you can still use the serial console to reconfigure it. All parameter settings are stored in NVS (non volatile storage), which is *not* erased by simple re-flashing the binaries. If you want to wipe it out, use "esptool.py -p /dev/ttyUSB0 erase_flash". 49 | 50 | ## Interpreting the on board LED 51 | 52 | If the ESP32 is connected to the upstream AP then the on board LED should be on, otherwise off. 53 | If there are devices connected to the ESP32 then the on board LED will keep blinking as many times as the number of devices connected. 54 | 55 | For example: 56 | 57 | One device connected to the ESP32, and the ESP32 is connected to upstream: 58 | 59 | `*****.*****` 60 | 61 | Two devices are connected to the ESP32, but the ESP32 is not connected to upstream: 62 | 63 | `....*.*....` 64 | 65 | # Command Line Interface 66 | 67 | For configuration you have to use a serial console (Putty or GtkTerm with 115200 bps). 68 | Use the "set_sta" and the "set_ap" command to configure the WiFi settings. Changes are stored persistently in NVS and are applied after next restart. Use "show" to display the current config. The NVS namespace for the parameters is "esp32_nat" 69 | 70 | Enter the `help` command get a full list of all available commands: 71 | ``` 72 | help 73 | Print the list of registered commands 74 | 75 | free 76 | Get the current size of free heap memory 77 | 78 | heap 79 | Get minimum size of free heap memory that was available during program execu 80 | tion 81 | 82 | version 83 | Get version of chip and SDK 84 | 85 | restart 86 | Software reset of the chip 87 | 88 | deep_sleep [-t ] [--io=] [--io_level=<0|1>] 89 | Enter deep sleep mode. Two wakeup modes are supported: timer and GPIO. If no 90 | wakeup option is specified, will sleep indefinitely. 91 | -t, --time= Wake up time, ms 92 | --io= If specified, wakeup using GPIO with given number 93 | --io_level=<0|1> GPIO level to trigger wakeup 94 | 95 | light_sleep [-t ] [--io=]... [--io_level=<0|1>]... 96 | Enter light sleep mode. Two wakeup modes are supported: timer and GPIO. Mult 97 | iple GPIO pins can be specified using pairs of 'io' and 'io_level' arguments 98 | . Will also wake up on UART input. 99 | -t, --time= Wake up time, ms 100 | --io= If specified, wakeup using GPIO with given number 101 | --io_level=<0|1> GPIO level to trigger wakeup 102 | 103 | tasks 104 | Get information about running tasks 105 | 106 | nvs_set -v 107 | Set key-value pair in selected namespace. 108 | Examples: 109 | nvs_set VarName i32 -v 110 | 123 111 | nvs_set VarName str -v YourString 112 | nvs_set VarName blob -v 0123456789abcdef 113 | key of the value to be set 114 | type can be: i8, u8, i16, u16 i32, u32 i64, u64, str, blob 115 | -v, --value= value to be stored 116 | 117 | nvs_get 118 | Get key-value pair from selected namespace. 119 | Example: nvs_get VarName i32 120 | key of the value to be read 121 | type can be: i8, u8, i16, u16 i32, u32 i64, u64, str, blob 122 | 123 | nvs_erase 124 | Erase key-value pair from current namespace 125 | key of the value to be erased 126 | 127 | nvs_namespace 128 | Set current namespace 129 | namespace of the partition to be selected 130 | 131 | nvs_list [-n ] [-t ] 132 | List stored key-value pairs stored in NVS.Namespace and type can be specified 133 | to print only those key-value pairs. 134 | 135 | Following command list variables stored inside 'nvs' partition, under namespace 'storage' with type uint32_t 136 | Example: nvs_list nvs -n storage -t u32 137 | 138 | partition name 139 | -n, --namespace= namespace name 140 | -t, --type= type can be: i8, u8, i16, u16 i32, u32 i64, u64, str, blob 141 | 142 | nvs_erase_namespace 143 | Erases specified namespace 144 | namespace to be erased 145 | 146 | set_sta 147 | Set SSID and password of the STA interface 148 | SSID 149 | Password 150 | --, -u, ----username= Enterprise username 151 | --, -a, ----anan= Enterprise identity 152 | 153 | set_sta_static 154 | Set Static IP for the STA interface 155 | IP 156 | Subnet Mask 157 | Gateway Address 158 | 159 | set_ap 160 | Set SSID and password of the SoftAP 161 | SSID of AP 162 | Password of AP 163 | 164 | set_ap_ip 165 | Set IP for the AP interface 166 | IP 167 | 168 | portmap [add|del] [TCP|UDP] 169 | Add or delete a portmapping to the router 170 | [add|del] add or delete portmapping 171 | [TCP|UDP] TCP or UDP port 172 | external port number 173 | internal IP 174 | internal port number 175 | 176 | show 177 | Get status and config of the router 178 | ``` 179 | 180 | If you want to enter non-ASCII or special characters (incl. ' ') you can use HTTP-style hex encoding (e.g. "My%20AccessPoint" results in a string "My AccessPoint"). 181 | 182 | ## Flashing the prebuild Binaries 183 | 184 | Get and install [esptool](https://github.com/espressif/esptool): 185 | 186 | ``` 187 | cd ~ 188 | python3 -m pip install pyserial 189 | git clone https://github.com/espressif/esptool 190 | cd esptool 191 | python3 setup.py install 192 | ``` 193 | 194 | Go to esp32_nat_router project directory and build for any kind of esp32 target. 195 | 196 | For esp32: 197 | 198 | ```bash 199 | esptool.py --chip esp32 \ 200 | --before default_reset --after hard_reset write_flash \ 201 | -z --flash_mode dio --flash_freq 40m --flash_size detect \ 202 | 0x1000 build/esp32/bootloader.bin \ 203 | 0x8000 build/esp32/partitions.bin \ 204 | 0x10000 build/esp32/firmware.bin 205 | ``` 206 | 207 | For esp32c3: 208 | 209 | ```bash 210 | esptool.py --chip esp32c3 \ 211 | --before default_reset --after hard_reset write_flash \ 212 | -z --flash_size detect \ 213 | 0x0 build/esp32c3/bootloader.bin \ 214 | 0x8000 build/esp32c3/partitions.bin \ 215 | 0x10000 build/esp32c3/firmware.bin 216 | ``` 217 | 218 | As an alternative you might use [Espressif's Flash Download Tools](https://www.espressif.com/en/products/hardware/esp32/resources) with the parameters given in the figure below (thanks to mahesh2000), update the filenames accordingly: 219 | 220 | ![image](https://raw.githubusercontent.com/martin-ger/esp32_nat_router/master/FlasherUI.jpg) 221 | 222 | Note that the prebuilt binaries do not include WPA2 Enterprise support. 223 | 224 | ## Building the Binaries (Method 1 - ESPIDF) 225 | The following are the steps required to compile this project: 226 | 227 | 1. Download and setup the ESP-IDF. 228 | 229 | 2. In the project directory run `make menuconfig` (or `idf.py menuconfig` for cmake). 230 | 1. *Component config -> LWIP > [x] Enable copy between Layer2 and Layer3 packets. 231 | 2. *Component config -> LWIP > [x] Enable IP forwarding. 232 | 3. *Component config -> LWIP > [x] Enable NAT (new/experimental). 233 | 3. Build the project and flash it to the ESP32. 234 | 235 | A detailed instruction on how to build, configure and flash a ESP-IDF project can also be found the official ESP-IDF guide. 236 | 237 | ## Building the Binaries (Method 2 - Platformio) 238 | The following are the steps required to compile this project: 239 | 240 | 1. Download Visual Studio Code, and the Platform IO extension. 241 | 2. In Platformio, install the ESP-IDF framework. 242 | 3. Build the project and flash it to the ESP32. 243 | 244 | ### DNS 245 | As soon as the ESP32 STA has learned a DNS IP from its upstream DNS server on first connect, it passes that to newly connected clients. 246 | Before that by default the DNS-Server which is offerd to clients connecting to the ESP32 AP is set to 8.8.8.8. 247 | Replace the value of the *MY_DNS_IP_ADDR* with your desired DNS-Server IP address (in hex) if you want to use a different one. 248 | 249 | ## Troubleshooting 250 | 251 | ### Line Endings 252 | 253 | The line endings in the Console Example are configured to match particular serial monitors. Therefore, if the following log output appears, consider using a different serial monitor (e.g. Putty for Windows or GtkTerm on Linux) or modify the example's UART configuration. 254 | 255 | ``` 256 | This is an example of ESP-IDF console component. 257 | Type 'help' to get the list of commands. 258 | Use UP/DOWN arrows to navigate through command history. 259 | Press TAB when typing command name to auto-complete. 260 | Your terminal application does not support escape sequences. 261 | Line editing and history features are disabled. 262 | On Windows, try using Putty instead. 263 | esp32> 264 | ``` 265 | -------------------------------------------------------------------------------- /build/esp32/bootloader.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paoloinverse/esp32_nat_router/d679ca514dcfd1842295b7c60f61f5e199f4b482/build/esp32/bootloader.bin -------------------------------------------------------------------------------- /build/esp32/firmware.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paoloinverse/esp32_nat_router/d679ca514dcfd1842295b7c60f61f5e199f4b482/build/esp32/firmware.bin -------------------------------------------------------------------------------- /build/esp32/partitions.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paoloinverse/esp32_nat_router/d679ca514dcfd1842295b7c60f61f5e199f4b482/build/esp32/partitions.bin -------------------------------------------------------------------------------- /build/esp32c3/bootloader.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paoloinverse/esp32_nat_router/d679ca514dcfd1842295b7c60f61f5e199f4b482/build/esp32c3/bootloader.bin -------------------------------------------------------------------------------- /build/esp32c3/firmware.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paoloinverse/esp32_nat_router/d679ca514dcfd1842295b7c60f61f5e199f4b482/build/esp32c3/firmware.bin -------------------------------------------------------------------------------- /build/esp32c3/partitions.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paoloinverse/esp32_nat_router/d679ca514dcfd1842295b7c60f61f5e199f4b482/build/esp32c3/partitions.bin -------------------------------------------------------------------------------- /components/cmd_nvs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "cmd_nvs.c" 2 | INCLUDE_DIRS . 3 | REQUIRES console nvs_flash) -------------------------------------------------------------------------------- /components/cmd_nvs/cmd_nvs.c: -------------------------------------------------------------------------------- 1 | /* Console example — NVS commands 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 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "esp_log.h" 16 | #include "esp_console.h" 17 | #include "argtable3/argtable3.h" 18 | #include "freertos/FreeRTOS.h" 19 | #include "freertos/event_groups.h" 20 | #include "esp_err.h" 21 | #include "cmd_nvs.h" 22 | #include "nvs.h" 23 | 24 | typedef struct { 25 | nvs_type_t type; 26 | const char *str; 27 | } type_str_pair_t; 28 | 29 | static const type_str_pair_t type_str_pair[] = { 30 | { NVS_TYPE_I8, "i8" }, 31 | { NVS_TYPE_U8, "u8" }, 32 | { NVS_TYPE_U16, "u16" }, 33 | { NVS_TYPE_I16, "i16" }, 34 | { NVS_TYPE_U32, "u32" }, 35 | { NVS_TYPE_I32, "i32" }, 36 | { NVS_TYPE_U64, "u64" }, 37 | { NVS_TYPE_I64, "i64" }, 38 | { NVS_TYPE_STR, "str" }, 39 | { NVS_TYPE_BLOB, "blob" }, 40 | { NVS_TYPE_ANY, "any" }, 41 | }; 42 | 43 | static const size_t TYPE_STR_PAIR_SIZE = sizeof(type_str_pair) / sizeof(type_str_pair[0]); 44 | static const char *ARG_TYPE_STR = "type can be: i8, u8, i16, u16 i32, u32 i64, u64, str, blob"; 45 | static char current_namespace[16] = "storage"; 46 | static const char *TAG = "cmd_nvs"; 47 | 48 | static struct { 49 | struct arg_str *key; 50 | struct arg_str *type; 51 | struct arg_str *value; 52 | struct arg_end *end; 53 | } set_args; 54 | 55 | static struct { 56 | struct arg_str *key; 57 | struct arg_str *type; 58 | struct arg_end *end; 59 | } get_args; 60 | 61 | static struct { 62 | struct arg_str *key; 63 | struct arg_end *end; 64 | } erase_args; 65 | 66 | static struct { 67 | struct arg_str *namespace; 68 | struct arg_end *end; 69 | } erase_all_args; 70 | 71 | static struct { 72 | struct arg_str *namespace; 73 | struct arg_end *end; 74 | } namespace_args; 75 | 76 | static struct { 77 | struct arg_str *partition; 78 | struct arg_str *namespace; 79 | struct arg_str *type; 80 | struct arg_end *end; 81 | } list_args; 82 | 83 | 84 | static nvs_type_t str_to_type(const char *type) 85 | { 86 | for (int i = 0; i < TYPE_STR_PAIR_SIZE; i++) { 87 | const type_str_pair_t *p = &type_str_pair[i]; 88 | if (strcmp(type, p->str) == 0) { 89 | return p->type; 90 | } 91 | } 92 | 93 | return NVS_TYPE_ANY; 94 | } 95 | 96 | static const char *type_to_str(nvs_type_t type) 97 | { 98 | for (int i = 0; i < TYPE_STR_PAIR_SIZE; i++) { 99 | const type_str_pair_t *p = &type_str_pair[i]; 100 | if (p->type == type) { 101 | return p->str; 102 | } 103 | } 104 | 105 | return "Unknown"; 106 | } 107 | 108 | static esp_err_t store_blob(nvs_handle_t nvs, const char *key, const char *str_values) 109 | { 110 | uint8_t value; 111 | size_t str_len = strlen(str_values); 112 | size_t blob_len = str_len / 2; 113 | 114 | if (str_len % 2) { 115 | ESP_LOGE(TAG, "Blob data must contain even number of characters"); 116 | return ESP_ERR_NVS_TYPE_MISMATCH; 117 | } 118 | 119 | char *blob = (char *)malloc(blob_len); 120 | if (blob == NULL) { 121 | return ESP_ERR_NO_MEM; 122 | } 123 | 124 | for (int i = 0, j = 0; i < str_len; i++) { 125 | char ch = str_values[i]; 126 | if (ch >= '0' && ch <= '9') { 127 | value = ch - '0'; 128 | } else if (ch >= 'A' && ch <= 'F') { 129 | value = ch - 'A' + 10; 130 | } else if (ch >= 'a' && ch <= 'f') { 131 | value = ch - 'a' + 10; 132 | } else { 133 | ESP_LOGE(TAG, "Blob data contain invalid character"); 134 | free(blob); 135 | return ESP_ERR_NVS_TYPE_MISMATCH; 136 | } 137 | 138 | if (i & 1) { 139 | blob[j++] += value; 140 | } else { 141 | blob[j] = value << 4; 142 | } 143 | } 144 | 145 | esp_err_t err = nvs_set_blob(nvs, key, blob, blob_len); 146 | free(blob); 147 | 148 | if (err == ESP_OK) { 149 | err = nvs_commit(nvs); 150 | } 151 | 152 | return err; 153 | } 154 | 155 | static void print_blob(const char *blob, size_t len) 156 | { 157 | for (int i = 0; i < len; i++) { 158 | printf("%02x", blob[i]); 159 | } 160 | printf("\n"); 161 | } 162 | 163 | 164 | static esp_err_t set_value_in_nvs(const char *key, const char *str_type, const char *str_value) 165 | { 166 | esp_err_t err; 167 | nvs_handle_t nvs; 168 | bool range_error = false; 169 | 170 | nvs_type_t type = str_to_type(str_type); 171 | 172 | if (type == NVS_TYPE_ANY) { 173 | ESP_LOGE(TAG, "Type '%s' is undefined", str_type); 174 | return ESP_ERR_NVS_TYPE_MISMATCH; 175 | } 176 | 177 | err = nvs_open(current_namespace, NVS_READWRITE, &nvs); 178 | if (err != ESP_OK) { 179 | return err; 180 | } 181 | 182 | if (type == NVS_TYPE_I8) { 183 | int32_t value = strtol(str_value, NULL, 0); 184 | if (value < INT8_MIN || value > INT8_MAX || errno == ERANGE) { 185 | range_error = true; 186 | } else { 187 | err = nvs_set_i8(nvs, key, (int8_t)value); 188 | } 189 | } else if (type == NVS_TYPE_U8) { 190 | uint32_t value = strtoul(str_value, NULL, 0); 191 | if (value > UINT8_MAX || errno == ERANGE) { 192 | range_error = true; 193 | } else { 194 | err = nvs_set_u8(nvs, key, (uint8_t)value); 195 | } 196 | } else if (type == NVS_TYPE_I16) { 197 | int32_t value = strtol(str_value, NULL, 0); 198 | if (value < INT16_MIN || value > INT16_MAX || errno == ERANGE) { 199 | range_error = true; 200 | } else { 201 | err = nvs_set_i16(nvs, key, (int16_t)value); 202 | } 203 | } else if (type == NVS_TYPE_U16) { 204 | uint32_t value = strtoul(str_value, NULL, 0); 205 | if (value > UINT16_MAX || errno == ERANGE) { 206 | range_error = true; 207 | } else { 208 | err = nvs_set_u16(nvs, key, (uint16_t)value); 209 | } 210 | } else if (type == NVS_TYPE_I32) { 211 | int32_t value = strtol(str_value, NULL, 0); 212 | if (errno != ERANGE) { 213 | err = nvs_set_i32(nvs, key, value); 214 | } 215 | } else if (type == NVS_TYPE_U32) { 216 | uint32_t value = strtoul(str_value, NULL, 0); 217 | if (errno != ERANGE) { 218 | err = nvs_set_u32(nvs, key, value); 219 | } 220 | } else if (type == NVS_TYPE_I64) { 221 | int64_t value = strtoll(str_value, NULL, 0); 222 | if (errno != ERANGE) { 223 | err = nvs_set_i64(nvs, key, value); 224 | } 225 | } else if (type == NVS_TYPE_U64) { 226 | uint64_t value = strtoull(str_value, NULL, 0); 227 | if (errno != ERANGE) { 228 | err = nvs_set_u64(nvs, key, value); 229 | } 230 | } else if (type == NVS_TYPE_STR) { 231 | err = nvs_set_str(nvs, key, str_value); 232 | } else if (type == NVS_TYPE_BLOB) { 233 | err = store_blob(nvs, key, str_value); 234 | } 235 | 236 | if (range_error || errno == ERANGE) { 237 | nvs_close(nvs); 238 | return ESP_ERR_NVS_VALUE_TOO_LONG; 239 | } 240 | 241 | if (err == ESP_OK) { 242 | err = nvs_commit(nvs); 243 | if (err == ESP_OK) { 244 | ESP_LOGI(TAG, "Value stored under key '%s'", key); 245 | } 246 | } 247 | 248 | nvs_close(nvs); 249 | return err; 250 | } 251 | 252 | static esp_err_t get_value_from_nvs(const char *key, const char *str_type) 253 | { 254 | nvs_handle_t nvs; 255 | esp_err_t err; 256 | 257 | nvs_type_t type = str_to_type(str_type); 258 | 259 | if (type == NVS_TYPE_ANY) { 260 | ESP_LOGE(TAG, "Type '%s' is undefined", str_type); 261 | return ESP_ERR_NVS_TYPE_MISMATCH; 262 | } 263 | 264 | err = nvs_open(current_namespace, NVS_READONLY, &nvs); 265 | if (err != ESP_OK) { 266 | return err; 267 | } 268 | 269 | if (type == NVS_TYPE_I8) { 270 | int8_t value; 271 | err = nvs_get_i8(nvs, key, &value); 272 | if (err == ESP_OK) { 273 | printf("%d\n", value); 274 | } 275 | } else if (type == NVS_TYPE_U8) { 276 | uint8_t value; 277 | err = nvs_get_u8(nvs, key, &value); 278 | if (err == ESP_OK) { 279 | printf("%u\n", value); 280 | } 281 | } else if (type == NVS_TYPE_I16) { 282 | int16_t value; 283 | err = nvs_get_i16(nvs, key, &value); 284 | if (err == ESP_OK) { 285 | printf("%u\n", value); 286 | } 287 | } else if (type == NVS_TYPE_U16) { 288 | uint16_t value; 289 | if ((err = nvs_get_u16(nvs, key, &value)) == ESP_OK) { 290 | printf("%u\n", value); 291 | } 292 | } else if (type == NVS_TYPE_I32) { 293 | int32_t value; 294 | if ((err = nvs_get_i32(nvs, key, &value)) == ESP_OK) { 295 | printf("%d\n", value); 296 | } 297 | } else if (type == NVS_TYPE_U32) { 298 | uint32_t value; 299 | if ((err = nvs_get_u32(nvs, key, &value)) == ESP_OK) { 300 | printf("%u\n", value); 301 | } 302 | } else if (type == NVS_TYPE_I64) { 303 | int64_t value; 304 | if ((err = nvs_get_i64(nvs, key, &value)) == ESP_OK) { 305 | printf("%lld\n", value); 306 | } 307 | } else if (type == NVS_TYPE_U64) { 308 | uint64_t value; 309 | if ( (err = nvs_get_u64(nvs, key, &value)) == ESP_OK) { 310 | printf("%llu\n", value); 311 | } 312 | } else if (type == NVS_TYPE_STR) { 313 | size_t len; 314 | if ( (err = nvs_get_str(nvs, key, NULL, &len)) == ESP_OK) { 315 | char *str = (char *)malloc(len); 316 | if ( (err = nvs_get_str(nvs, key, str, &len)) == ESP_OK) { 317 | printf("%s\n", str); 318 | } 319 | free(str); 320 | } 321 | } else if (type == NVS_TYPE_BLOB) { 322 | size_t len; 323 | if ( (err = nvs_get_blob(nvs, key, NULL, &len)) == ESP_OK) { 324 | char *blob = (char *)malloc(len); 325 | if ( (err = nvs_get_blob(nvs, key, blob, &len)) == ESP_OK) { 326 | print_blob(blob, len); 327 | } 328 | free(blob); 329 | } 330 | } 331 | 332 | nvs_close(nvs); 333 | return err; 334 | } 335 | 336 | static esp_err_t erase(const char *key) 337 | { 338 | nvs_handle_t nvs; 339 | 340 | esp_err_t err = nvs_open(current_namespace, NVS_READWRITE, &nvs); 341 | if (err == ESP_OK) { 342 | err = nvs_erase_key(nvs, key); 343 | if (err == ESP_OK) { 344 | err = nvs_commit(nvs); 345 | if (err == ESP_OK) { 346 | ESP_LOGI(TAG, "Value with key '%s' erased", key); 347 | } 348 | } 349 | nvs_close(nvs); 350 | } 351 | 352 | return err; 353 | } 354 | 355 | static esp_err_t erase_all(const char *name) 356 | { 357 | nvs_handle_t nvs; 358 | 359 | esp_err_t err = nvs_open(name, NVS_READWRITE, &nvs); 360 | if (err == ESP_OK) { 361 | err = nvs_erase_all(nvs); 362 | if (err == ESP_OK) { 363 | err = nvs_commit(nvs); 364 | } 365 | } 366 | 367 | ESP_LOGI(TAG, "Namespace '%s' was %s erased", name, (err == ESP_OK) ? "" : "not"); 368 | 369 | nvs_close(nvs); 370 | return ESP_OK; 371 | } 372 | 373 | static int list(const char *part, const char *name, const char *str_type) 374 | { 375 | nvs_type_t type = str_to_type(str_type); 376 | 377 | nvs_iterator_t it = nvs_entry_find(part, NULL, type); 378 | if (it == NULL) { 379 | ESP_LOGE(TAG, "No such enty was found"); 380 | return 1; 381 | } 382 | 383 | do { 384 | nvs_entry_info_t info; 385 | nvs_entry_info(it, &info); 386 | it = nvs_entry_next(it); 387 | 388 | printf("namespace '%s', key '%s', type '%s' \n", 389 | info.namespace_name, info.key, type_to_str(info.type)); 390 | } while (it != NULL); 391 | 392 | return 0; 393 | } 394 | 395 | static int set_value(int argc, char **argv) 396 | { 397 | int nerrors = arg_parse(argc, argv, (void **) &set_args); 398 | if (nerrors != 0) { 399 | arg_print_errors(stderr, set_args.end, argv[0]); 400 | return 1; 401 | } 402 | 403 | const char *key = set_args.key->sval[0]; 404 | const char *type = set_args.type->sval[0]; 405 | const char *values = set_args.value->sval[0]; 406 | 407 | esp_err_t err = set_value_in_nvs(key, type, values); 408 | 409 | if (err != ESP_OK) { 410 | ESP_LOGE(TAG, "%s", esp_err_to_name(err)); 411 | return 1; 412 | } 413 | 414 | return 0; 415 | } 416 | 417 | static int get_value(int argc, char **argv) 418 | { 419 | int nerrors = arg_parse(argc, argv, (void **) &get_args); 420 | if (nerrors != 0) { 421 | arg_print_errors(stderr, get_args.end, argv[0]); 422 | return 1; 423 | } 424 | 425 | const char *key = get_args.key->sval[0]; 426 | const char *type = get_args.type->sval[0]; 427 | 428 | esp_err_t err = get_value_from_nvs(key, type); 429 | 430 | if (err != ESP_OK) { 431 | ESP_LOGE(TAG, "%s", esp_err_to_name(err)); 432 | return 1; 433 | } 434 | 435 | return 0; 436 | } 437 | 438 | static int erase_value(int argc, char **argv) 439 | { 440 | int nerrors = arg_parse(argc, argv, (void **) &erase_args); 441 | if (nerrors != 0) { 442 | arg_print_errors(stderr, erase_args.end, argv[0]); 443 | return 1; 444 | } 445 | 446 | const char *key = erase_args.key->sval[0]; 447 | 448 | esp_err_t err = erase(key); 449 | 450 | if (err != ESP_OK) { 451 | ESP_LOGE(TAG, "%s", esp_err_to_name(err)); 452 | return 1; 453 | } 454 | 455 | return 0; 456 | } 457 | 458 | static int erase_namespace(int argc, char **argv) 459 | { 460 | int nerrors = arg_parse(argc, argv, (void **) &erase_all_args); 461 | if (nerrors != 0) { 462 | arg_print_errors(stderr, erase_all_args.end, argv[0]); 463 | return 1; 464 | } 465 | 466 | const char *name = erase_all_args.namespace->sval[0]; 467 | 468 | esp_err_t err = erase_all(name); 469 | if (err != ESP_OK) { 470 | ESP_LOGE(TAG, "%s", esp_err_to_name(err)); 471 | return 1; 472 | } 473 | 474 | return 0; 475 | } 476 | 477 | static int set_namespace(int argc, char **argv) 478 | { 479 | int nerrors = arg_parse(argc, argv, (void **) &namespace_args); 480 | if (nerrors != 0) { 481 | arg_print_errors(stderr, namespace_args.end, argv[0]); 482 | return 1; 483 | } 484 | 485 | const char *namespace = namespace_args.namespace->sval[0]; 486 | strlcpy(current_namespace, namespace, sizeof(current_namespace)); 487 | ESP_LOGI(TAG, "Namespace set to '%s'", current_namespace); 488 | return 0; 489 | } 490 | 491 | static int list_entries(int argc, char **argv) 492 | { 493 | list_args.partition->sval[0] = ""; 494 | list_args.namespace->sval[0] = ""; 495 | list_args.type->sval[0] = ""; 496 | 497 | int nerrors = arg_parse(argc, argv, (void **) &list_args); 498 | if (nerrors != 0) { 499 | arg_print_errors(stderr, list_args.end, argv[0]); 500 | return 1; 501 | } 502 | 503 | const char *part = list_args.partition->sval[0]; 504 | const char *name = list_args.namespace->sval[0]; 505 | const char *type = list_args.type->sval[0]; 506 | 507 | return list(part, name, type); 508 | } 509 | 510 | void register_nvs(void) 511 | { 512 | set_args.key = arg_str1(NULL, NULL, "", "key of the value to be set"); 513 | set_args.type = arg_str1(NULL, NULL, "", ARG_TYPE_STR); 514 | 515 | set_args.value = arg_str1("v", "value", "", "value to be stored"); 516 | set_args.end = arg_end(2); 517 | 518 | get_args.key = arg_str1(NULL, NULL, "", "key of the value to be read"); 519 | get_args.type = arg_str1(NULL, NULL, "", ARG_TYPE_STR); 520 | get_args.end = arg_end(2); 521 | 522 | erase_args.key = arg_str1(NULL, NULL, "", "key of the value to be erased"); 523 | erase_args.end = arg_end(2); 524 | 525 | erase_all_args.namespace = arg_str1(NULL, NULL, "", "namespace to be erased"); 526 | erase_all_args.end = arg_end(2); 527 | 528 | namespace_args.namespace = arg_str1(NULL, NULL, "", "namespace of the partition to be selected"); 529 | namespace_args.end = arg_end(2); 530 | 531 | list_args.partition = arg_str1(NULL, NULL, "", "partition name"); 532 | list_args.namespace = arg_str0("n", "namespace", "", "namespace name"); 533 | list_args.type = arg_str0("t", "type", "", ARG_TYPE_STR); 534 | list_args.end = arg_end(2); 535 | 536 | const esp_console_cmd_t set_cmd = { 537 | .command = "nvs_set", 538 | .help = "Set key-value pair in selected namespace.\n" 539 | "Examples:\n" 540 | " nvs_set VarName i32 -v 123 \n" 541 | " nvs_set VarName str -v YourString \n" 542 | " nvs_set VarName blob -v 0123456789abcdef \n", 543 | .hint = NULL, 544 | .func = &set_value, 545 | .argtable = &set_args 546 | }; 547 | 548 | const esp_console_cmd_t get_cmd = { 549 | .command = "nvs_get", 550 | .help = "Get key-value pair from selected namespace. \n" 551 | "Example: nvs_get VarName i32", 552 | .hint = NULL, 553 | .func = &get_value, 554 | .argtable = &get_args 555 | }; 556 | 557 | const esp_console_cmd_t erase_cmd = { 558 | .command = "nvs_erase", 559 | .help = "Erase key-value pair from current namespace", 560 | .hint = NULL, 561 | .func = &erase_value, 562 | .argtable = &erase_args 563 | }; 564 | 565 | const esp_console_cmd_t erase_namespace_cmd = { 566 | .command = "nvs_erase_namespace", 567 | .help = "Erases specified namespace", 568 | .hint = NULL, 569 | .func = &erase_namespace, 570 | .argtable = &erase_all_args 571 | }; 572 | 573 | const esp_console_cmd_t namespace_cmd = { 574 | .command = "nvs_namespace", 575 | .help = "Set current namespace", 576 | .hint = NULL, 577 | .func = &set_namespace, 578 | .argtable = &namespace_args 579 | }; 580 | 581 | const esp_console_cmd_t list_entries_cmd = { 582 | .command = "nvs_list", 583 | .help = "List stored key-value pairs stored in NVS." 584 | "Namespace and type can be specified to print only those key-value pairs.\n" 585 | "Following command list variables stored inside 'nvs' partition, under namespace 'storage' with type uint32_t" 586 | "Example: nvs_list nvs -n storage -t u32 \n", 587 | .hint = NULL, 588 | .func = &list_entries, 589 | .argtable = &list_args 590 | }; 591 | 592 | ESP_ERROR_CHECK(esp_console_cmd_register(&set_cmd)); 593 | ESP_ERROR_CHECK(esp_console_cmd_register(&get_cmd)); 594 | ESP_ERROR_CHECK(esp_console_cmd_register(&erase_cmd)); 595 | ESP_ERROR_CHECK(esp_console_cmd_register(&namespace_cmd)); 596 | ESP_ERROR_CHECK(esp_console_cmd_register(&list_entries_cmd)); 597 | ESP_ERROR_CHECK(esp_console_cmd_register(&erase_namespace_cmd)); 598 | } 599 | -------------------------------------------------------------------------------- /components/cmd_nvs/cmd_nvs.h: -------------------------------------------------------------------------------- 1 | /* Console example — declarations of command registration functions. 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 | #pragma once 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | // Register NVS functions 16 | void register_nvs(void); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /components/cmd_nvs/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Component Makefile 3 | # 4 | # This Makefile should, at the very least, just include $(SDK_PATH)/Makefile. By default, 5 | # this will take the sources in the src/ directory, compile them and link them into 6 | # lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable, 7 | # please read the SDK documents if you need to do this. 8 | # 9 | 10 | COMPONENT_ADD_INCLUDEDIRS := . 11 | -------------------------------------------------------------------------------- /components/cmd_router/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "cmd_router.c" 2 | INCLUDE_DIRS . 3 | REQUIRES console nvs_flash) 4 | -------------------------------------------------------------------------------- /components/cmd_router/cmd_router.c: -------------------------------------------------------------------------------- 1 | /* The CLI commands of the router 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 | 8 | #include 9 | #include 10 | #include 11 | #include "esp_log.h" 12 | #include "esp_console.h" 13 | #include "esp_system.h" 14 | #include "esp_sleep.h" 15 | #include "esp_spi_flash.h" 16 | #include "driver/rtc_io.h" 17 | #include "driver/uart.h" 18 | #include "argtable3/argtable3.h" 19 | #include "freertos/FreeRTOS.h" 20 | #include "freertos/task.h" 21 | #include "sdkconfig.h" 22 | #include "nvs.h" 23 | #include "esp_wifi.h" 24 | 25 | #include "lwip/ip4_addr.h" 26 | #if !IP_NAPT 27 | #error "IP_NAPT must be defined" 28 | #endif 29 | #include "lwip/lwip_napt.h" 30 | 31 | #include "router_globals.h" 32 | #include "cmd_router.h" 33 | 34 | #ifdef CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS 35 | #define WITH_TASKS_INFO 1 36 | #endif 37 | 38 | static const char *TAG = "cmd_router"; 39 | 40 | static void register_set_sta(void); 41 | static void register_set_sta_static(void); 42 | static void register_set_ap(void); 43 | static void register_set_ap_ip(void); 44 | static void register_show(void); 45 | static void register_portmap(void); 46 | 47 | void preprocess_string(char* str) 48 | { 49 | char *p, *q; 50 | 51 | for (p = q = str; *p != 0; p++) 52 | { 53 | if (*(p) == '%' && *(p + 1) != 0 && *(p + 2) != 0) 54 | { 55 | // quoted hex 56 | uint8_t a; 57 | p++; 58 | if (*p <= '9') 59 | a = *p - '0'; 60 | else 61 | a = toupper((unsigned char)*p) - 'A' + 10; 62 | a <<= 4; 63 | p++; 64 | if (*p <= '9') 65 | a += *p - '0'; 66 | else 67 | a += toupper((unsigned char)*p) - 'A' + 10; 68 | *q++ = a; 69 | } 70 | else if (*(p) == '+') { 71 | *q++ = ' '; 72 | } else { 73 | *q++ = *p; 74 | } 75 | } 76 | *q = '\0'; 77 | } 78 | 79 | esp_err_t get_config_param_str(char* name, char** param) 80 | { 81 | nvs_handle_t nvs; 82 | 83 | esp_err_t err = nvs_open(PARAM_NAMESPACE, NVS_READONLY, &nvs); 84 | if (err == ESP_OK) { 85 | size_t len; 86 | if ( (err = nvs_get_str(nvs, name, NULL, &len)) == ESP_OK) { 87 | *param = (char *)malloc(len); 88 | err = nvs_get_str(nvs, name, *param, &len); 89 | ESP_LOGI(TAG, "%s %s", name, *param); 90 | } else { 91 | return err; 92 | } 93 | nvs_close(nvs); 94 | } else { 95 | return err; 96 | } 97 | return ESP_OK; 98 | } 99 | 100 | esp_err_t get_config_param_int(char* name, int* param) 101 | { 102 | nvs_handle_t nvs; 103 | 104 | esp_err_t err = nvs_open(PARAM_NAMESPACE, NVS_READONLY, &nvs); 105 | if (err == ESP_OK) { 106 | if ( (err = nvs_get_i32(nvs, name, (int32_t*)(param))) == ESP_OK) { 107 | ESP_LOGI(TAG, "%s %d", name, *param); 108 | } else { 109 | return err; 110 | } 111 | nvs_close(nvs); 112 | } else { 113 | return err; 114 | } 115 | return ESP_OK; 116 | } 117 | 118 | esp_err_t get_config_param_blob(char* name, uint8_t* blob, size_t blob_len) 119 | { 120 | nvs_handle_t nvs; 121 | 122 | esp_err_t err = nvs_open(PARAM_NAMESPACE, NVS_READONLY, &nvs); 123 | if (err == ESP_OK) { 124 | size_t len; 125 | if ( (err = nvs_get_blob(nvs, name, NULL, &len)) == ESP_OK) { 126 | if (len != blob_len) { 127 | return ESP_ERR_NVS_INVALID_LENGTH; 128 | } 129 | err = nvs_get_blob(nvs, name, blob, &len); 130 | ESP_LOGI(TAG, "%s: %d", name, len); 131 | } else { 132 | return err; 133 | } 134 | nvs_close(nvs); 135 | } else { 136 | return err; 137 | } 138 | return ESP_OK; 139 | } 140 | 141 | void register_router(void) 142 | { 143 | register_set_sta(); 144 | register_set_sta_static(); 145 | register_set_ap(); 146 | register_set_ap_ip(); 147 | register_portmap(); 148 | register_show(); 149 | } 150 | 151 | /** Arguments used by 'set_sta' function */ 152 | static struct { 153 | struct arg_str* ssid; 154 | struct arg_str* password; 155 | struct arg_str* ent_username; 156 | struct arg_str* ent_identity; 157 | struct arg_end* end; 158 | } set_sta_arg; 159 | 160 | /* 'set_sta' command */ 161 | int set_sta(int argc, char **argv) 162 | { 163 | esp_err_t err; 164 | nvs_handle_t nvs; 165 | 166 | int nerrors = arg_parse(argc, argv, (void **) &set_sta_arg); 167 | if (nerrors != 0) { 168 | arg_print_errors(stderr, set_sta_arg.end, argv[0]); 169 | return 1; 170 | } 171 | 172 | preprocess_string((char*)set_sta_arg.ssid->sval[0]); 173 | preprocess_string((char*)set_sta_arg.password->sval[0]); 174 | 175 | err = nvs_open(PARAM_NAMESPACE, NVS_READWRITE, &nvs); 176 | if (err != ESP_OK) { 177 | return err; 178 | } 179 | 180 | err = nvs_set_str(nvs, "ssid", set_sta_arg.ssid->sval[0]); 181 | if (err == ESP_OK) { 182 | err = nvs_set_str(nvs, "passwd", set_sta_arg.password->sval[0]); 183 | if (err == ESP_OK) { 184 | if (set_sta_arg.ent_username->count > 0) { 185 | err = nvs_set_str(nvs, "ent_username", set_sta_arg.ent_username->sval[0]); 186 | } 187 | else { 188 | err = nvs_set_str(nvs, "ent_username", ""); 189 | } 190 | 191 | if (err == ESP_OK) { 192 | if (set_sta_arg.ent_identity->count > 0) { 193 | err = nvs_set_str(nvs, "ent_identity", set_sta_arg.ent_identity->sval[0]); 194 | } 195 | else { 196 | err = nvs_set_str(nvs, "ent_identity", ""); 197 | } 198 | 199 | if (err == ESP_OK) { 200 | err = nvs_commit(nvs); 201 | if (err == ESP_OK) { 202 | ESP_LOGI(TAG, "STA settings %s/%s stored.", set_sta_arg.ssid->sval[0], set_sta_arg.password->sval[0]); 203 | } 204 | } 205 | } 206 | } 207 | } 208 | nvs_close(nvs); 209 | return err; 210 | } 211 | 212 | static void register_set_sta(void) 213 | { 214 | set_sta_arg.ssid = arg_str1(NULL, NULL, "", "SSID"); 215 | set_sta_arg.password = arg_str1(NULL, NULL, "", "Password"); 216 | set_sta_arg.ent_username = arg_str0("-u", "--username", "", "Enterprise username"); 217 | set_sta_arg.ent_identity = arg_str0("-a", "--anan", "", "Enterprise identity"); 218 | set_sta_arg.end = arg_end(2); 219 | 220 | const esp_console_cmd_t cmd = { 221 | .command = "set_sta", 222 | .help = "Set SSID and password of the STA interface", 223 | .hint = NULL, 224 | .func = &set_sta, 225 | .argtable = &set_sta_arg 226 | }; 227 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 228 | } 229 | 230 | 231 | /** Arguments used by 'set_sta_static' function */ 232 | static struct { 233 | struct arg_str *static_ip; 234 | struct arg_str *subnet_mask; 235 | struct arg_str *gateway_addr; 236 | struct arg_end *end; 237 | } set_sta_static_arg; 238 | 239 | /* 'set_sta_static' command */ 240 | int set_sta_static(int argc, char **argv) 241 | { 242 | esp_err_t err; 243 | nvs_handle_t nvs; 244 | 245 | int nerrors = arg_parse(argc, argv, (void **) &set_sta_static_arg); 246 | if (nerrors != 0) { 247 | arg_print_errors(stderr, set_sta_static_arg.end, argv[0]); 248 | return 1; 249 | } 250 | 251 | preprocess_string((char*)set_sta_static_arg.static_ip->sval[0]); 252 | preprocess_string((char*)set_sta_static_arg.subnet_mask->sval[0]); 253 | preprocess_string((char*)set_sta_static_arg.gateway_addr->sval[0]); 254 | 255 | err = nvs_open(PARAM_NAMESPACE, NVS_READWRITE, &nvs); 256 | if (err != ESP_OK) { 257 | return err; 258 | } 259 | 260 | err = nvs_set_str(nvs, "static_ip", set_sta_static_arg.static_ip->sval[0]); 261 | if (err == ESP_OK) { 262 | err = nvs_set_str(nvs, "subnet_mask", set_sta_static_arg.subnet_mask->sval[0]); 263 | if (err == ESP_OK) { 264 | err = nvs_set_str(nvs, "gateway_addr", set_sta_static_arg.gateway_addr->sval[0]); 265 | if (err == ESP_OK) { 266 | err = nvs_commit(nvs); 267 | if (err == ESP_OK) { 268 | ESP_LOGI(TAG, "STA Static IP settings %s/%s/%s stored.", set_sta_static_arg.static_ip->sval[0], set_sta_static_arg.subnet_mask->sval[0], set_sta_static_arg.gateway_addr->sval[0]); 269 | } 270 | } 271 | } 272 | } 273 | nvs_close(nvs); 274 | return err; 275 | } 276 | 277 | static void register_set_sta_static(void) 278 | { 279 | set_sta_static_arg.static_ip = arg_str1(NULL, NULL, "", "IP"); 280 | set_sta_static_arg.subnet_mask = arg_str1(NULL, NULL, "", "Subnet Mask"); 281 | set_sta_static_arg.gateway_addr = arg_str1(NULL, NULL, "", "Gateway Address"); 282 | set_sta_static_arg.end = arg_end(3); 283 | 284 | const esp_console_cmd_t cmd = { 285 | .command = "set_sta_static", 286 | .help = "Set Static IP for the STA interface", 287 | .hint = NULL, 288 | .func = &set_sta_static, 289 | .argtable = &set_sta_static_arg 290 | }; 291 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 292 | } 293 | 294 | /** Arguments used by 'set_ap' function */ 295 | static struct { 296 | struct arg_str *ssid; 297 | struct arg_str *password; 298 | struct arg_end *end; 299 | } set_ap_args; 300 | 301 | /* 'set_ap' command */ 302 | int set_ap(int argc, char **argv) 303 | { 304 | esp_err_t err; 305 | nvs_handle_t nvs; 306 | 307 | int nerrors = arg_parse(argc, argv, (void **) &set_ap_args); 308 | if (nerrors != 0) { 309 | arg_print_errors(stderr, set_ap_args.end, argv[0]); 310 | return 1; 311 | } 312 | 313 | preprocess_string((char*)set_ap_args.ssid->sval[0]); 314 | preprocess_string((char*)set_ap_args.password->sval[0]); 315 | 316 | if (strlen(set_ap_args.password->sval[0]) < 8) { 317 | printf("AP will be open (no passwd needed).\n"); 318 | } 319 | 320 | err = nvs_open(PARAM_NAMESPACE, NVS_READWRITE, &nvs); 321 | if (err != ESP_OK) { 322 | return err; 323 | } 324 | 325 | err = nvs_set_str(nvs, "ap_ssid", set_ap_args.ssid->sval[0]); 326 | if (err == ESP_OK) { 327 | err = nvs_set_str(nvs, "ap_passwd", set_ap_args.password->sval[0]); 328 | if (err == ESP_OK) { 329 | err = nvs_commit(nvs); 330 | if (err == ESP_OK) { 331 | ESP_LOGI(TAG, "AP settings %s/%s stored.", set_ap_args.ssid->sval[0], set_ap_args.password->sval[0]); 332 | } 333 | } 334 | } 335 | nvs_close(nvs); 336 | return err; 337 | } 338 | 339 | static void register_set_ap(void) 340 | { 341 | set_ap_args.ssid = arg_str1(NULL, NULL, "", "SSID of AP"); 342 | set_ap_args.password = arg_str1(NULL, NULL, "", "Password of AP"); 343 | set_ap_args.end = arg_end(2); 344 | 345 | const esp_console_cmd_t cmd = { 346 | .command = "set_ap", 347 | .help = "Set SSID and password of the SoftAP", 348 | .hint = NULL, 349 | .func = &set_ap, 350 | .argtable = &set_ap_args 351 | }; 352 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 353 | } 354 | 355 | /** Arguments used by 'set_ap_ip' function */ 356 | static struct { 357 | struct arg_str *ap_ip_str; 358 | struct arg_end *end; 359 | } set_ap_ip_arg; 360 | 361 | 362 | /* 'set_ap_ip' command */ 363 | int set_ap_ip(int argc, char **argv) 364 | { 365 | esp_err_t err; 366 | nvs_handle_t nvs; 367 | 368 | int nerrors = arg_parse(argc, argv, (void **) &set_ap_ip_arg); 369 | if (nerrors != 0) { 370 | arg_print_errors(stderr, set_ap_ip_arg.end, argv[0]); 371 | return 1; 372 | } 373 | 374 | preprocess_string((char*)set_ap_ip_arg.ap_ip_str->sval[0]); 375 | 376 | err = nvs_open(PARAM_NAMESPACE, NVS_READWRITE, &nvs); 377 | if (err != ESP_OK) { 378 | return err; 379 | } 380 | 381 | err = nvs_set_str(nvs, "ap_ip", set_ap_ip_arg.ap_ip_str->sval[0]); 382 | if (err == ESP_OK) { 383 | ESP_LOGI(TAG, "AP IP address %s stored.", set_ap_ip_arg.ap_ip_str->sval[0]); 384 | } 385 | nvs_close(nvs); 386 | return err; 387 | } 388 | 389 | static void register_set_ap_ip(void) 390 | { 391 | set_ap_ip_arg.ap_ip_str = arg_str1(NULL, NULL, "", "IP"); 392 | set_ap_ip_arg.end = arg_end(1); 393 | 394 | const esp_console_cmd_t cmd = { 395 | .command = "set_ap_ip", 396 | .help = "Set IP for the AP interface", 397 | .hint = NULL, 398 | .func = &set_ap_ip, 399 | .argtable = &set_ap_ip_arg 400 | }; 401 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 402 | } 403 | 404 | /** Arguments used by 'portmap' function */ 405 | static struct { 406 | struct arg_str *add_del; 407 | struct arg_str *TCP_UDP; 408 | struct arg_int *ext_port; 409 | struct arg_str *int_ip; 410 | struct arg_int *int_port; 411 | struct arg_end *end; 412 | } portmap_args; 413 | 414 | /* 'portmap' command */ 415 | int portmap(int argc, char **argv) 416 | { 417 | int nerrors = arg_parse(argc, argv, (void **) &portmap_args); 418 | if (nerrors != 0) { 419 | arg_print_errors(stderr, portmap_args.end, argv[0]); 420 | return 1; 421 | } 422 | 423 | bool add; 424 | if (strcmp((char *)portmap_args.add_del->sval[0], "add")== 0) { 425 | add = true; 426 | } else if (strcmp((char *)portmap_args.add_del->sval[0], "del")== 0) { 427 | add = false; 428 | } else { 429 | printf("Must be 'add' or 'del'\n"); 430 | return 1; 431 | } 432 | 433 | uint8_t tcp_udp; 434 | if (strcmp((char *)portmap_args.TCP_UDP->sval[0], "TCP")== 0) { 435 | tcp_udp = PROTO_TCP; 436 | } else if (strcmp((char *)portmap_args.TCP_UDP->sval[0], "UDP")== 0) { 437 | tcp_udp = PROTO_UDP; 438 | } else { 439 | printf("Must be 'TCP' or 'UDP'\n"); 440 | return 1; 441 | } 442 | 443 | uint16_t ext_port = portmap_args.ext_port->ival[0]; 444 | uint32_t int_ip = ipaddr_addr((char *)portmap_args.int_ip->sval[0]); 445 | uint16_t int_port = portmap_args.int_port->ival[0]; 446 | 447 | //printf("portmap %d %d %x %d %x %d\n", add, tcp_udp, my_ip, ext_port, int_ip, int_port); 448 | 449 | if (add) { 450 | add_portmap(tcp_udp, ext_port, int_ip, int_port); 451 | } else { 452 | del_portmap(tcp_udp, ext_port); 453 | } 454 | 455 | return ESP_OK; 456 | } 457 | 458 | static void register_portmap(void) 459 | { 460 | portmap_args.add_del = arg_str1(NULL, NULL, "[add|del]", "add or delete portmapping"); 461 | portmap_args.TCP_UDP = arg_str1(NULL, NULL, "[TCP|UDP]", "TCP or UDP port"); 462 | portmap_args.ext_port = arg_int1(NULL, NULL, "", "external port number"); 463 | portmap_args.int_ip = arg_str1(NULL, NULL, "", "internal IP"); 464 | portmap_args.int_port = arg_int1(NULL, NULL, "", "internal port number"); 465 | portmap_args.end = arg_end(5); 466 | 467 | const esp_console_cmd_t cmd = { 468 | .command = "portmap", 469 | .help = "Add or delete a portmapping to the router", 470 | .hint = NULL, 471 | .func = &portmap, 472 | .argtable = &portmap_args 473 | }; 474 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 475 | } 476 | 477 | /* 'show' command */ 478 | static int show(int argc, char **argv) 479 | { 480 | char* ssid = NULL; 481 | char* ent_username = NULL; 482 | char* ent_identity = NULL; 483 | char* passwd = NULL; 484 | char* static_ip = NULL; 485 | char* subnet_mask = NULL; 486 | char* gateway_addr = NULL; 487 | char* ap_ssid = NULL; 488 | char* ap_passwd = NULL; 489 | 490 | get_config_param_str("ssid", &ssid); 491 | get_config_param_str("ent_username", &ent_username); 492 | get_config_param_str("ent_identity", &ent_identity); 493 | get_config_param_str("passwd", &passwd); 494 | get_config_param_str("static_ip", &static_ip); 495 | get_config_param_str("subnet_mask", &subnet_mask); 496 | get_config_param_str("gateway_addr", &gateway_addr); 497 | get_config_param_str("ap_ssid", &ap_ssid); 498 | get_config_param_str("ap_passwd", &ap_passwd); 499 | 500 | printf("STA SSID: %s Password: %s Enterprise: %s %s\n", 501 | ssid != NULL ? ssid : "", 502 | passwd != NULL ? passwd : "", 503 | ((ent_username != NULL) && (strlen(ent_username) > 0)) ? ent_username : "", 504 | ((ent_username != NULL) && (strlen(ent_username) > 0) && (ent_identity != NULL) && (strlen(ent_identity) > 0)) ? ent_identity : "" 505 | ); 506 | printf("AP SSID: %s Password: %s\n", ap_ssid != NULL ? ap_ssid : "", 507 | ap_passwd != NULL ? ap_passwd : ""); 508 | ip4_addr_t addr; 509 | addr.addr = my_ap_ip; 510 | printf("AP IP address: " IPSTR "\n", IP2STR(&addr)); 511 | 512 | if (ssid != NULL) free(ssid); 513 | if (ent_username != NULL) free(ent_username); 514 | if (ent_identity != NULL) free(ent_identity); 515 | if (passwd != NULL) free(passwd); 516 | if (static_ip != NULL) free(static_ip); 517 | if (subnet_mask != NULL) free(subnet_mask); 518 | if (gateway_addr != NULL) free(gateway_addr); 519 | if (ap_ssid != NULL) free(ap_ssid); 520 | if (ap_passwd != NULL) free(ap_passwd); 521 | 522 | printf("Uplink AP %sconnected\n", ap_connect?"":"not "); 523 | if (ap_connect) { 524 | addr.addr = my_ip; 525 | printf ("IP: " IPSTR "\n", IP2STR(&addr)); 526 | } 527 | printf("%d Stations connected\n", connect_count); 528 | 529 | print_portmap_tab(); 530 | 531 | return 0; 532 | } 533 | 534 | static void register_show(void) 535 | { 536 | const esp_console_cmd_t cmd = { 537 | .command = "show", 538 | .help = "Get status and config of the router", 539 | .hint = NULL, 540 | .func = &show, 541 | }; 542 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 543 | } 544 | 545 | -------------------------------------------------------------------------------- /components/cmd_router/cmd_router.h: -------------------------------------------------------------------------------- 1 | /* Console example — various router commands 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 | #pragma once 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | // Register router functions 16 | void register_router(void); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /components/cmd_router/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Component Makefile 3 | # 4 | # This Makefile should, at the very least, just include $(SDK_PATH)/Makefile. By default, 5 | # this will take the sources in the src/ directory, compile them and link them into 6 | # lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable, 7 | # please read the SDK documents if you need to do this. 8 | # 9 | 10 | COMPONENT_ADD_INCLUDEDIRS := . 11 | -------------------------------------------------------------------------------- /components/cmd_router/router_globals.h: -------------------------------------------------------------------------------- 1 | /* Various global declarations for the esp32_nat_router 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 | #pragma once 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #define PARAM_NAMESPACE "esp32_nat" 14 | 15 | #define PROTO_TCP 6 16 | #define PROTO_UDP 17 17 | 18 | extern char* ssid; 19 | extern char* ent_username; 20 | extern char* ent_identity; 21 | extern char* passwd; 22 | extern char* static_ip; 23 | extern char* subnet_mask; 24 | extern char* gateway_addr; 25 | extern char* ap_ssid; 26 | extern char* ap_passwd; 27 | 28 | extern uint16_t connect_count; 29 | extern bool ap_connect; 30 | 31 | extern uint32_t my_ip; 32 | extern uint32_t my_ap_ip; 33 | 34 | void preprocess_string(char* str); 35 | int set_sta(int argc, char **argv); 36 | int set_sta_static(int argc, char **argv); 37 | int set_ap(int argc, char **argv); 38 | 39 | esp_err_t get_config_param_int(char* name, int* param); 40 | esp_err_t get_config_param_str(char* name, char** param); 41 | 42 | void print_portmap_tab(); 43 | esp_err_t add_portmap(u8_t proto, u16_t mport, u32_t daddr, u16_t dport); 44 | esp_err_t del_portmap(u8_t proto, u16_t mport); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /components/cmd_system/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "cmd_system.c" 2 | INCLUDE_DIRS . 3 | REQUIRES console spi_flash) -------------------------------------------------------------------------------- /components/cmd_system/cmd_system.c: -------------------------------------------------------------------------------- 1 | /* Console example — various system commands 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 | 10 | #include 11 | #include 12 | #include 13 | #include "esp_log.h" 14 | #include "esp_console.h" 15 | #include "esp_system.h" 16 | #include "esp_sleep.h" 17 | #include "esp_spi_flash.h" 18 | #include "driver/rtc_io.h" 19 | #include "driver/uart.h" 20 | #include "argtable3/argtable3.h" 21 | #include "freertos/FreeRTOS.h" 22 | #include "freertos/task.h" 23 | #include "cmd_system.h" 24 | #include "sdkconfig.h" 25 | 26 | #ifdef CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS 27 | #define WITH_TASKS_INFO 1 28 | #endif 29 | 30 | static const char *TAG = "cmd_system"; 31 | 32 | static void register_free(void); 33 | static void register_heap(void); 34 | static void register_version(void); 35 | static void register_restart(void); 36 | static void register_deep_sleep(void); 37 | static void register_light_sleep(void); 38 | #if WITH_TASKS_INFO 39 | static void register_tasks(void); 40 | #endif 41 | 42 | void register_system(void) 43 | { 44 | register_free(); 45 | register_heap(); 46 | register_version(); 47 | register_restart(); 48 | register_deep_sleep(); 49 | register_light_sleep(); 50 | #if WITH_TASKS_INFO 51 | register_tasks(); 52 | #endif 53 | } 54 | 55 | /* 'version' command */ 56 | static int get_version(int argc, char **argv) 57 | { 58 | esp_chip_info_t info; 59 | esp_chip_info(&info); 60 | printf("IDF Version:%s\r\n", esp_get_idf_version()); 61 | printf("Chip info:\r\n"); 62 | printf("\tmodel:%s\r\n", info.model == CHIP_ESP32 ? "ESP32" : "Unknow"); 63 | printf("\tcores:%d\r\n", info.cores); 64 | printf("\tfeature:%s%s%s%s%d%s\r\n", 65 | info.features & CHIP_FEATURE_WIFI_BGN ? "/802.11bgn" : "", 66 | info.features & CHIP_FEATURE_BLE ? "/BLE" : "", 67 | info.features & CHIP_FEATURE_BT ? "/BT" : "", 68 | info.features & CHIP_FEATURE_EMB_FLASH ? "/Embedded-Flash:" : "/External-Flash:", 69 | spi_flash_get_chip_size() / (1024 * 1024), " MB"); 70 | printf("\trevision number:%d\r\n", info.revision); 71 | return 0; 72 | } 73 | 74 | static void register_version(void) 75 | { 76 | const esp_console_cmd_t cmd = { 77 | .command = "version", 78 | .help = "Get version of chip and SDK", 79 | .hint = NULL, 80 | .func = &get_version, 81 | }; 82 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 83 | } 84 | 85 | /** 'restart' command restarts the program */ 86 | 87 | static int restart(int argc, char **argv) 88 | { 89 | ESP_LOGI(TAG, "Restarting"); 90 | esp_restart(); 91 | } 92 | 93 | static void register_restart(void) 94 | { 95 | const esp_console_cmd_t cmd = { 96 | .command = "restart", 97 | .help = "Software reset of the chip", 98 | .hint = NULL, 99 | .func = &restart, 100 | }; 101 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 102 | } 103 | 104 | /** 'free' command prints available heap memory */ 105 | 106 | static int free_mem(int argc, char **argv) 107 | { 108 | printf("%d\n", esp_get_free_heap_size()); 109 | return 0; 110 | } 111 | 112 | static void register_free(void) 113 | { 114 | const esp_console_cmd_t cmd = { 115 | .command = "free", 116 | .help = "Get the current size of free heap memory", 117 | .hint = NULL, 118 | .func = &free_mem, 119 | }; 120 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 121 | } 122 | 123 | /* 'heap' command prints minumum heap size */ 124 | static int heap_size(int argc, char **argv) 125 | { 126 | uint32_t heap_size = heap_caps_get_minimum_free_size(MALLOC_CAP_DEFAULT); 127 | ESP_LOGI(TAG, "min heap size: %u", heap_size); 128 | return 0; 129 | } 130 | 131 | static void register_heap(void) 132 | { 133 | const esp_console_cmd_t heap_cmd = { 134 | .command = "heap", 135 | .help = "Get minimum size of free heap memory that was available during program execution", 136 | .hint = NULL, 137 | .func = &heap_size, 138 | }; 139 | ESP_ERROR_CHECK( esp_console_cmd_register(&heap_cmd) ); 140 | 141 | } 142 | 143 | /** 'tasks' command prints the list of tasks and related information */ 144 | #if WITH_TASKS_INFO 145 | 146 | static int tasks_info(int argc, char **argv) 147 | { 148 | const size_t bytes_per_task = 40; /* see vTaskList description */ 149 | char *task_list_buffer = malloc(uxTaskGetNumberOfTasks() * bytes_per_task); 150 | if (task_list_buffer == NULL) { 151 | ESP_LOGE(TAG, "failed to allocate buffer for vTaskList output"); 152 | return 1; 153 | } 154 | fputs("Task Name\tStatus\tPrio\tHWM\tTask#", stdout); 155 | #ifdef CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID 156 | fputs("\tAffinity", stdout); 157 | #endif 158 | fputs("\n", stdout); 159 | vTaskList(task_list_buffer); 160 | fputs(task_list_buffer, stdout); 161 | free(task_list_buffer); 162 | return 0; 163 | } 164 | 165 | static void register_tasks(void) 166 | { 167 | const esp_console_cmd_t cmd = { 168 | .command = "tasks", 169 | .help = "Get information about running tasks", 170 | .hint = NULL, 171 | .func = &tasks_info, 172 | }; 173 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 174 | } 175 | 176 | #endif // WITH_TASKS_INFO 177 | 178 | /** 'deep_sleep' command puts the chip into deep sleep mode */ 179 | 180 | static struct { 181 | struct arg_int *wakeup_time; 182 | struct arg_int *wakeup_gpio_num; 183 | struct arg_int *wakeup_gpio_level; 184 | struct arg_end *end; 185 | } deep_sleep_args; 186 | 187 | 188 | static int deep_sleep(int argc, char **argv) 189 | { 190 | int nerrors = arg_parse(argc, argv, (void **) &deep_sleep_args); 191 | if (nerrors != 0) { 192 | arg_print_errors(stderr, deep_sleep_args.end, argv[0]); 193 | return 1; 194 | } 195 | if (deep_sleep_args.wakeup_time->count) { 196 | uint64_t timeout = 1000ULL * deep_sleep_args.wakeup_time->ival[0]; 197 | ESP_LOGI(TAG, "Enabling timer wakeup, timeout=%lluus", timeout); 198 | ESP_ERROR_CHECK( esp_sleep_enable_timer_wakeup(timeout) ); 199 | } 200 | if (deep_sleep_args.wakeup_gpio_num->count) { 201 | int io_num = deep_sleep_args.wakeup_gpio_num->ival[0]; 202 | if (!rtc_gpio_is_valid_gpio(io_num)) { 203 | ESP_LOGE(TAG, "GPIO %d is not an RTC IO", io_num); 204 | return 1; 205 | } 206 | int level = 0; 207 | if (deep_sleep_args.wakeup_gpio_level->count) { 208 | level = deep_sleep_args.wakeup_gpio_level->ival[0]; 209 | if (level != 0 && level != 1) { 210 | ESP_LOGE(TAG, "Invalid wakeup level: %d", level); 211 | return 1; 212 | } 213 | } 214 | ESP_LOGI(TAG, "Enabling wakeup on GPIO%d, wakeup on %s level", 215 | io_num, level ? "HIGH" : "LOW"); 216 | 217 | #if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) 218 | ESP_ERROR_CHECK( esp_sleep_enable_ext1_wakeup(1ULL << io_num, level) ); 219 | #endif 220 | } 221 | #if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) 222 | rtc_gpio_isolate(GPIO_NUM_12); 223 | #endif 224 | esp_deep_sleep_start(); 225 | } 226 | 227 | static void register_deep_sleep(void) 228 | { 229 | deep_sleep_args.wakeup_time = 230 | arg_int0("t", "time", "", "Wake up time, ms"); 231 | deep_sleep_args.wakeup_gpio_num = 232 | arg_int0(NULL, "io", "", 233 | "If specified, wakeup using GPIO with given number"); 234 | deep_sleep_args.wakeup_gpio_level = 235 | arg_int0(NULL, "io_level", "<0|1>", "GPIO level to trigger wakeup"); 236 | deep_sleep_args.end = arg_end(3); 237 | 238 | const esp_console_cmd_t cmd = { 239 | .command = "deep_sleep", 240 | .help = "Enter deep sleep mode. " 241 | "Two wakeup modes are supported: timer and GPIO. " 242 | "If no wakeup option is specified, will sleep indefinitely.", 243 | .hint = NULL, 244 | .func = &deep_sleep, 245 | .argtable = &deep_sleep_args 246 | }; 247 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 248 | } 249 | 250 | /** 'light_sleep' command puts the chip into light sleep mode */ 251 | 252 | static struct { 253 | struct arg_int *wakeup_time; 254 | struct arg_int *wakeup_gpio_num; 255 | struct arg_int *wakeup_gpio_level; 256 | struct arg_end *end; 257 | } light_sleep_args; 258 | 259 | static int light_sleep(int argc, char **argv) 260 | { 261 | int nerrors = arg_parse(argc, argv, (void **) &light_sleep_args); 262 | if (nerrors != 0) { 263 | arg_print_errors(stderr, light_sleep_args.end, argv[0]); 264 | return 1; 265 | } 266 | esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_ALL); 267 | if (light_sleep_args.wakeup_time->count) { 268 | uint64_t timeout = 1000ULL * light_sleep_args.wakeup_time->ival[0]; 269 | ESP_LOGI(TAG, "Enabling timer wakeup, timeout=%lluus", timeout); 270 | ESP_ERROR_CHECK( esp_sleep_enable_timer_wakeup(timeout) ); 271 | } 272 | int io_count = light_sleep_args.wakeup_gpio_num->count; 273 | if (io_count != light_sleep_args.wakeup_gpio_level->count) { 274 | ESP_LOGE(TAG, "Should have same number of 'io' and 'io_level' arguments"); 275 | return 1; 276 | } 277 | for (int i = 0; i < io_count; ++i) { 278 | int io_num = light_sleep_args.wakeup_gpio_num->ival[i]; 279 | int level = light_sleep_args.wakeup_gpio_level->ival[i]; 280 | if (level != 0 && level != 1) { 281 | ESP_LOGE(TAG, "Invalid wakeup level: %d", level); 282 | return 1; 283 | } 284 | ESP_LOGI(TAG, "Enabling wakeup on GPIO%d, wakeup on %s level", 285 | io_num, level ? "HIGH" : "LOW"); 286 | 287 | ESP_ERROR_CHECK( gpio_wakeup_enable(io_num, level ? GPIO_INTR_HIGH_LEVEL : GPIO_INTR_LOW_LEVEL) ); 288 | } 289 | if (io_count > 0) { 290 | ESP_ERROR_CHECK( esp_sleep_enable_gpio_wakeup() ); 291 | } 292 | if (CONFIG_ESP_CONSOLE_UART_NUM <= UART_NUM_1) { 293 | ESP_LOGI(TAG, "Enabling UART wakeup (press ENTER to exit light sleep)"); 294 | ESP_ERROR_CHECK( uart_set_wakeup_threshold(CONFIG_ESP_CONSOLE_UART_NUM, 3) ); 295 | ESP_ERROR_CHECK( esp_sleep_enable_uart_wakeup(CONFIG_ESP_CONSOLE_UART_NUM) ); 296 | } 297 | fflush(stdout); 298 | uart_wait_tx_idle_polling(CONFIG_ESP_CONSOLE_UART_NUM); 299 | esp_light_sleep_start(); 300 | esp_sleep_wakeup_cause_t cause = esp_sleep_get_wakeup_cause(); 301 | const char *cause_str; 302 | switch (cause) { 303 | case ESP_SLEEP_WAKEUP_GPIO: 304 | cause_str = "GPIO"; 305 | break; 306 | case ESP_SLEEP_WAKEUP_UART: 307 | cause_str = "UART"; 308 | break; 309 | case ESP_SLEEP_WAKEUP_TIMER: 310 | cause_str = "timer"; 311 | break; 312 | default: 313 | cause_str = "unknown"; 314 | printf("%d\n", cause); 315 | } 316 | ESP_LOGI(TAG, "Woke up from: %s", cause_str); 317 | return 0; 318 | } 319 | 320 | static void register_light_sleep(void) 321 | { 322 | light_sleep_args.wakeup_time = 323 | arg_int0("t", "time", "", "Wake up time, ms"); 324 | light_sleep_args.wakeup_gpio_num = 325 | arg_intn(NULL, "io", "", 0, 8, 326 | "If specified, wakeup using GPIO with given number"); 327 | light_sleep_args.wakeup_gpio_level = 328 | arg_intn(NULL, "io_level", "<0|1>", 0, 8, "GPIO level to trigger wakeup"); 329 | light_sleep_args.end = arg_end(3); 330 | 331 | const esp_console_cmd_t cmd = { 332 | .command = "light_sleep", 333 | .help = "Enter light sleep mode. " 334 | "Two wakeup modes are supported: timer and GPIO. " 335 | "Multiple GPIO pins can be specified using pairs of " 336 | "'io' and 'io_level' arguments. " 337 | "Will also wake up on UART input.", 338 | .hint = NULL, 339 | .func = &light_sleep, 340 | .argtable = &light_sleep_args 341 | }; 342 | ESP_ERROR_CHECK( esp_console_cmd_register(&cmd) ); 343 | } 344 | 345 | -------------------------------------------------------------------------------- /components/cmd_system/cmd_system.h: -------------------------------------------------------------------------------- 1 | /* Console example — various system commands 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 | #pragma once 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | // Register system functions 16 | void register_system(void); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /components/cmd_system/component.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Component Makefile 3 | # 4 | # This Makefile should, at the very least, just include $(SDK_PATH)/Makefile. By default, 5 | # this will take the sources in the src/ directory, compile them and link them into 6 | # lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable, 7 | # please read the SDK documents if you need to do this. 8 | # 9 | 10 | COMPONENT_ADD_INCLUDEDIRS := . 11 | -------------------------------------------------------------------------------- /main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | idf_component_register(SRCS "esp32_nat_router.c" 2 | "http_server.c" 3 | INCLUDE_DIRS ".") 4 | -------------------------------------------------------------------------------- /main/Kconfig.projbuild: -------------------------------------------------------------------------------- 1 | menu "Example Configuration" 2 | 3 | config STORE_HISTORY 4 | bool "Store command history in flash" 5 | default y 6 | help 7 | Linenoise line editing library provides functions to save and load 8 | command history. If this option is enabled, initalizes a FAT filesystem 9 | and uses it to store command history. 10 | 11 | endmenu -------------------------------------------------------------------------------- /main/cmd_decl.h: -------------------------------------------------------------------------------- 1 | /* Declarations of command registration functions. 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 | #pragma once 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | #include "cmd_system.h" 16 | #include "cmd_nvs.h" 17 | #include "cmd_router.h" 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /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 | 6 | -------------------------------------------------------------------------------- /main/esp32_nat_router.c: -------------------------------------------------------------------------------- 1 | /* Console 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 | 10 | #include 11 | #include 12 | #include 13 | #include "esp_system.h" 14 | #include "esp_log.h" 15 | #include "esp_console.h" 16 | #include "esp_vfs_dev.h" 17 | #include "driver/uart.h" 18 | #include "linenoise/linenoise.h" 19 | #include "argtable3/argtable3.h" 20 | #include "esp_vfs_fat.h" 21 | #include "nvs.h" 22 | #include "nvs_flash.h" 23 | 24 | #include "freertos/event_groups.h" 25 | #include "esp_wifi.h" 26 | #include "esp_wpa2.h" 27 | 28 | #include "lwip/opt.h" 29 | #include "lwip/err.h" 30 | #include "lwip/sys.h" 31 | 32 | #include "cmd_decl.h" 33 | #include 34 | 35 | #if !IP_NAPT 36 | #error "IP_NAPT must be defined" 37 | #endif 38 | #include "lwip/lwip_napt.h" 39 | 40 | #include "router_globals.h" 41 | 42 | // On board LED 43 | #define BLINK_GPIO 2 44 | 45 | /* FreeRTOS event group to signal when we are connected*/ 46 | static EventGroupHandle_t wifi_event_group; 47 | 48 | /* The event group allows multiple bits for each event, but we only care about one event 49 | * - are we connected to the AP with an IP? */ 50 | const int WIFI_CONNECTED_BIT = BIT0; 51 | 52 | #define DEFAULT_AP_IP "192.168.4.1" 53 | #define DEFAULT_DNS "8.8.8.8" 54 | 55 | /* Global vars */ 56 | uint16_t connect_count = 0; 57 | bool ap_connect = false; 58 | bool has_static_ip = false; 59 | 60 | uint32_t my_ip; 61 | uint32_t my_ap_ip; 62 | 63 | struct portmap_table_entry { 64 | u32_t daddr; 65 | u16_t mport; 66 | u16_t dport; 67 | u8_t proto; 68 | u8_t valid; 69 | }; 70 | struct portmap_table_entry portmap_tab[IP_PORTMAP_MAX]; 71 | 72 | esp_netif_t* wifiAP; 73 | esp_netif_t* wifiSTA; 74 | 75 | httpd_handle_t start_webserver(void); 76 | 77 | static const char *TAG = "ESP32 NAT router"; 78 | 79 | /* Console command history can be stored to and loaded from a file. 80 | * The easiest way to do this is to use FATFS filesystem on top of 81 | * wear_levelling library. 82 | */ 83 | #if CONFIG_STORE_HISTORY 84 | 85 | #define MOUNT_PATH "/data" 86 | #define HISTORY_PATH MOUNT_PATH "/history.txt" 87 | 88 | static void initialize_filesystem(void) 89 | { 90 | static wl_handle_t wl_handle; 91 | const esp_vfs_fat_mount_config_t mount_config = { 92 | .max_files = 4, 93 | .format_if_mount_failed = true 94 | }; 95 | esp_err_t err = esp_vfs_fat_spiflash_mount(MOUNT_PATH, "storage", &mount_config, &wl_handle); 96 | if (err != ESP_OK) { 97 | ESP_LOGE(TAG, "Failed to mount FATFS (%s)", esp_err_to_name(err)); 98 | return; 99 | } 100 | } 101 | #endif // CONFIG_STORE_HISTORY 102 | 103 | static void initialize_nvs(void) 104 | { 105 | esp_err_t err = nvs_flash_init(); 106 | if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { 107 | ESP_ERROR_CHECK( nvs_flash_erase() ); 108 | err = nvs_flash_init(); 109 | } 110 | ESP_ERROR_CHECK(err); 111 | } 112 | 113 | esp_err_t apply_portmap_tab() { 114 | for (int i = 0; i ", IP2STR(&addr), portmap_tab[i].mport); 138 | addr.addr = portmap_tab[i].daddr; 139 | printf (IPSTR":%d\n", IP2STR(&addr), portmap_tab[i].dport); 140 | } 141 | } 142 | } 143 | 144 | esp_err_t get_portmap_tab() { 145 | esp_err_t err; 146 | nvs_handle_t nvs; 147 | size_t len; 148 | 149 | err = nvs_open(PARAM_NAMESPACE, NVS_READWRITE, &nvs); 150 | if (err != ESP_OK) { 151 | return err; 152 | } 153 | err = nvs_get_blob(nvs, "portmap_tab", NULL, &len); 154 | if (err == ESP_OK) { 155 | if (len != sizeof(portmap_tab)) { 156 | err = ESP_ERR_NVS_INVALID_LENGTH; 157 | } else { 158 | err = nvs_get_blob(nvs, "portmap_tab", portmap_tab, &len); 159 | if (err != ESP_OK) { 160 | memset(portmap_tab, 0, sizeof(portmap_tab)); 161 | } 162 | } 163 | } 164 | nvs_close(nvs); 165 | 166 | return err; 167 | } 168 | 169 | esp_err_t add_portmap(u8_t proto, u16_t mport, u32_t daddr, u16_t dport) { 170 | esp_err_t err; 171 | nvs_handle_t nvs; 172 | 173 | for (int i = 0; iip_info.ip)); 338 | ap_connect = true; 339 | if (esp_netif_get_dns_info(wifiSTA, ESP_NETIF_DNS_MAIN, &dns) == ESP_OK) 340 | { 341 | dnsserver.type = IPADDR_TYPE_V4; 342 | dnsserver.u_addr.ip4.addr = dns.ip.u_addr.ip4.addr; 343 | dhcps_dns_setserver(&dnsserver); 344 | ESP_LOGI(TAG, "set dns to:" IPSTR, IP2STR(&(dnsserver.u_addr.ip4))); 345 | } 346 | xEventGroupSetBits(wifi_event_group, WIFI_CONNECTED_BIT); 347 | } 348 | else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_AP_STACONNECTED) 349 | { 350 | connect_count++; 351 | ESP_LOGI(TAG,"%d. station connected", connect_count); 352 | } 353 | else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_AP_STADISCONNECTED) 354 | { 355 | connect_count--; 356 | ESP_LOGI(TAG,"station disconnected - %d remain", connect_count); 357 | } 358 | } 359 | 360 | const int CONNECTED_BIT = BIT0; 361 | #define JOIN_TIMEOUT_MS (2000) 362 | 363 | void wifi_init(const char* ssid, const char* ent_username, const char* ent_identity, const char* passwd, const char* static_ip, const char* subnet_mask, const char* gateway_addr, const char* ap_ssid, const char* ap_passwd, const char* ap_ip) 364 | { 365 | ip_addr_t dnsserver; 366 | //tcpip_adapter_dns_info_t dnsinfo; 367 | 368 | wifi_event_group = xEventGroupCreate(); 369 | 370 | esp_netif_init(); 371 | ESP_ERROR_CHECK(esp_event_loop_create_default()); 372 | wifiAP = esp_netif_create_default_wifi_ap(); 373 | wifiSTA = esp_netif_create_default_wifi_sta(); 374 | 375 | tcpip_adapter_ip_info_t ipInfo_sta; 376 | if ((strlen(ssid) > 0) && (strlen(static_ip) > 0) && (strlen(subnet_mask) > 0) && (strlen(gateway_addr) > 0)) { 377 | has_static_ip = true; 378 | my_ip = ipInfo_sta.ip.addr = ipaddr_addr(static_ip); 379 | ipInfo_sta.gw.addr = ipaddr_addr(gateway_addr); 380 | ipInfo_sta.netmask.addr = ipaddr_addr(subnet_mask); 381 | tcpip_adapter_dhcpc_stop(TCPIP_ADAPTER_IF_STA); // Don't run a DHCP client 382 | tcpip_adapter_set_ip_info(TCPIP_ADAPTER_IF_STA, &ipInfo_sta); 383 | apply_portmap_tab(); 384 | } 385 | 386 | my_ap_ip = ipaddr_addr(ap_ip); 387 | 388 | esp_netif_ip_info_t ipInfo_ap; 389 | ipInfo_ap.ip.addr = my_ap_ip; 390 | ipInfo_ap.gw.addr = my_ap_ip; 391 | IP4_ADDR(&ipInfo_ap.netmask, 255,255,255,0); 392 | esp_netif_dhcps_stop(wifiAP); // stop before setting ip WifiAP 393 | esp_netif_set_ip_info(wifiAP, &ipInfo_ap); 394 | esp_netif_dhcps_start(wifiAP); 395 | 396 | esp_event_handler_instance_t instance_any_id; 397 | esp_event_handler_instance_t instance_got_ip; 398 | ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT, 399 | ESP_EVENT_ANY_ID, 400 | &wifi_event_handler, 401 | NULL, 402 | &instance_any_id)); 403 | ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT, 404 | IP_EVENT_STA_GOT_IP, 405 | &wifi_event_handler, 406 | NULL, 407 | &instance_got_ip)); 408 | 409 | wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); 410 | ESP_ERROR_CHECK(esp_wifi_init(&cfg)); 411 | 412 | /* ESP WIFI CONFIG */ 413 | wifi_config_t wifi_config = { 0 }; 414 | wifi_config_t ap_config = { 415 | .ap = { 416 | .channel = 0, 417 | .authmode = WIFI_AUTH_WPA2_PSK, 418 | .ssid_hidden = 0, 419 | .max_connection = 8, 420 | .beacon_interval = 100, 421 | } 422 | }; 423 | 424 | strlcpy((char*)ap_config.sta.ssid, ap_ssid, sizeof(ap_config.sta.ssid)); 425 | if (strlen(ap_passwd) < 8) { 426 | ap_config.ap.authmode = WIFI_AUTH_OPEN; 427 | } else { 428 | strlcpy((char*)ap_config.sta.password, ap_passwd, sizeof(ap_config.sta.password)); 429 | } 430 | 431 | if (strlen(ssid) > 0) { 432 | ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_APSTA) ); 433 | 434 | //Set SSID 435 | strlcpy((char*)wifi_config.sta.ssid, ssid, sizeof(wifi_config.sta.ssid)); 436 | //Set passwprd 437 | if(strlen(ent_username) == 0) { 438 | ESP_LOGI(TAG, "STA regular connection"); 439 | strlcpy((char*)wifi_config.sta.password, passwd, sizeof(wifi_config.sta.password)); 440 | } 441 | ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_STA, &wifi_config) ); 442 | if(strlen(ent_username) != 0 && strlen(ent_identity) != 0) { 443 | ESP_LOGI(TAG, "STA enterprise connection"); 444 | if(strlen(ent_username) != 0 && strlen(ent_identity) != 0) { 445 | esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)ent_identity, strlen(ent_identity)); //provide identity 446 | } else { 447 | esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)ent_username, strlen(ent_username)); 448 | } 449 | esp_wifi_sta_wpa2_ent_set_username((uint8_t *)ent_username, strlen(ent_username)); //provide username 450 | esp_wifi_sta_wpa2_ent_set_password((uint8_t *)passwd, strlen(passwd)); //provide password 451 | esp_wifi_sta_wpa2_ent_enable(); 452 | } 453 | 454 | ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &ap_config) ); 455 | } else { 456 | ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP) ); 457 | ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &ap_config) ); 458 | } 459 | 460 | // Enable DNS (offer) for dhcp server 461 | dhcps_offer_t dhcps_dns_value = OFFER_DNS; 462 | dhcps_set_option_info(6, &dhcps_dns_value, sizeof(dhcps_dns_value)); 463 | 464 | // Set custom dns server address for dhcp server 465 | dnsserver.u_addr.ip4.addr = ipaddr_addr(DEFAULT_DNS);; 466 | dnsserver.type = IPADDR_TYPE_V4; 467 | dhcps_dns_setserver(&dnsserver); 468 | 469 | // tcpip_adapter_get_dns_info(TCPIP_ADAPTER_IF_AP, TCPIP_ADAPTER_DNS_MAIN, &dnsinfo); 470 | // ESP_LOGI(TAG, "DNS IP:" IPSTR, IP2STR(&dnsinfo.ip.u_addr.ip4)); 471 | 472 | xEventGroupWaitBits(wifi_event_group, CONNECTED_BIT, 473 | pdFALSE, pdTRUE, JOIN_TIMEOUT_MS / portTICK_PERIOD_MS); 474 | ESP_ERROR_CHECK(esp_wifi_start()); 475 | 476 | if (strlen(ssid) > 0) { 477 | ESP_LOGI(TAG, "wifi_init_apsta finished."); 478 | ESP_LOGI(TAG, "connect to ap SSID: %s ", ssid); 479 | } else { 480 | ESP_LOGI(TAG, "wifi_init_ap with default finished."); 481 | } 482 | } 483 | 484 | char* ssid = NULL; 485 | char* ent_username = NULL; 486 | char* ent_identity = NULL; 487 | char* passwd = NULL; 488 | char* static_ip = NULL; 489 | char* subnet_mask = NULL; 490 | char* gateway_addr = NULL; 491 | char* ap_ssid = NULL; 492 | char* ap_passwd = NULL; 493 | char* ap_ip = NULL; 494 | 495 | char* param_set_default(const char* def_val) { 496 | char * retval = malloc(strlen(def_val)+1); 497 | strcpy(retval, def_val); 498 | return retval; 499 | } 500 | 501 | void app_main(void) 502 | { 503 | initialize_nvs(); 504 | 505 | #if CONFIG_STORE_HISTORY 506 | initialize_filesystem(); 507 | ESP_LOGI(TAG, "Command history enabled"); 508 | #else 509 | ESP_LOGI(TAG, "Command history disabled"); 510 | #endif 511 | 512 | get_config_param_str("ssid", &ssid); 513 | if (ssid == NULL) { 514 | ssid = param_set_default(""); 515 | } 516 | get_config_param_str("ent_username", &ent_username); 517 | if (ent_username == NULL) { 518 | ent_username = param_set_default(""); 519 | } 520 | get_config_param_str("ent_identity", &ent_identity); 521 | if (ent_identity == NULL) { 522 | ent_identity = param_set_default(""); 523 | } 524 | get_config_param_str("passwd", &passwd); 525 | if (passwd == NULL) { 526 | passwd = param_set_default(""); 527 | } 528 | get_config_param_str("static_ip", &static_ip); 529 | if (static_ip == NULL) { 530 | static_ip = param_set_default(""); 531 | } 532 | get_config_param_str("subnet_mask", &subnet_mask); 533 | if (subnet_mask == NULL) { 534 | subnet_mask = param_set_default(""); 535 | } 536 | get_config_param_str("gateway_addr", &gateway_addr); 537 | if (gateway_addr == NULL) { 538 | gateway_addr = param_set_default(""); 539 | } 540 | get_config_param_str("ap_ssid", &ap_ssid); 541 | if (ap_ssid == NULL) { 542 | ap_ssid = param_set_default("ESP32_NAT_Router"); 543 | } 544 | get_config_param_str("ap_passwd", &ap_passwd); 545 | if (ap_passwd == NULL) { 546 | ap_passwd = param_set_default(""); 547 | } 548 | get_config_param_str("ap_ip", &ap_ip); 549 | if (ap_ip == NULL) { 550 | ap_ip = param_set_default(DEFAULT_AP_IP); 551 | } 552 | 553 | get_portmap_tab(); 554 | 555 | // Setup WIFI 556 | wifi_init(ssid, ent_username, ent_identity, passwd, static_ip, subnet_mask, gateway_addr, ap_ssid, ap_passwd, ap_ip); 557 | 558 | pthread_t t1; 559 | pthread_create(&t1, NULL, led_status_thread, NULL); 560 | 561 | ip_napt_enable(my_ap_ip, 1); 562 | ESP_LOGI(TAG, "NAT is enabled"); 563 | 564 | char* lock = NULL; 565 | get_config_param_str("lock", &lock); 566 | if (lock == NULL) { 567 | lock = param_set_default("0"); 568 | } 569 | if (strcmp(lock, "0") ==0) { 570 | ESP_LOGI(TAG,"Starting config web server"); 571 | start_webserver(); 572 | } 573 | free(lock); 574 | 575 | initialize_console(); 576 | 577 | /* Register commands */ 578 | esp_console_register_help_command(); 579 | register_system(); 580 | register_nvs(); 581 | register_router(); 582 | 583 | /* Prompt to be printed before each line. 584 | * This can be customized, made dynamic, etc. 585 | */ 586 | const char* prompt = LOG_COLOR_I "esp32> " LOG_RESET_COLOR; 587 | 588 | printf("\n" 589 | "ESP32 NAT ROUTER\n" 590 | "Type 'help' to get the list of commands.\n" 591 | "Use UP/DOWN arrows to navigate through command history.\n" 592 | "Press TAB when typing command name to auto-complete.\n"); 593 | 594 | if (strlen(ssid) == 0) { 595 | printf("\n" 596 | "Unconfigured WiFi\n" 597 | "Configure using 'set_sta' and 'set_ap' and restart.\n"); 598 | } 599 | 600 | /* Figure out if the terminal supports escape sequences */ 601 | int probe_status = linenoiseProbe(); 602 | if (probe_status) { /* zero indicates success */ 603 | printf("\n" 604 | "Your terminal application does not support escape sequences.\n" 605 | "Line editing and history features are disabled.\n" 606 | "On Windows, try using Putty instead.\n"); 607 | linenoiseSetDumbMode(1); 608 | #if CONFIG_LOG_COLORS 609 | /* Since the terminal doesn't support escape sequences, 610 | * don't use color codes in the prompt. 611 | */ 612 | prompt = "esp32> "; 613 | #endif //CONFIG_LOG_COLORS 614 | } 615 | 616 | /* Main loop */ 617 | while(true) { 618 | /* Get a line using linenoise. 619 | * The line is returned when ENTER is pressed. 620 | */ 621 | char* line = linenoise(prompt); 622 | if (line == NULL) { /* Ignore empty lines */ 623 | continue; 624 | } 625 | /* Add the command to the history */ 626 | linenoiseHistoryAdd(line); 627 | #if CONFIG_STORE_HISTORY 628 | /* Save command history to filesystem */ 629 | linenoiseHistorySave(HISTORY_PATH); 630 | #endif 631 | 632 | /* Try to run the command */ 633 | int ret; 634 | esp_err_t err = esp_console_run(line, &ret); 635 | if (err == ESP_ERR_NOT_FOUND) { 636 | printf("Unrecognized command\n"); 637 | } else if (err == ESP_ERR_INVALID_ARG) { 638 | // command was empty 639 | } else if (err == ESP_OK && ret != ESP_OK) { 640 | printf("Command returned non-zero error code: 0x%x (%s)\n", ret, esp_err_to_name(ret)); 641 | } else if (err != ESP_OK) { 642 | printf("Internal error: %s\n", esp_err_to_name(err)); 643 | } 644 | /* linenoise allocates line buffer on the heap, so need to free it */ 645 | linenoiseFree(line); 646 | } 647 | } 648 | -------------------------------------------------------------------------------- /main/http_server.c: -------------------------------------------------------------------------------- 1 | /* Simple HTTP Server 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 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | //#include "nvs_flash.h" 17 | #include "esp_netif.h" 18 | //#include "esp_eth.h" 19 | //#include "protocol_examples_common.h" 20 | 21 | #include 22 | 23 | #include "pages.h" 24 | #include "router_globals.h" 25 | 26 | static const char *TAG = "HTTPServer"; 27 | 28 | esp_timer_handle_t restart_timer; 29 | 30 | static void restart_timer_callback(void* arg) 31 | { 32 | ESP_LOGI(TAG, "Restarting now..."); 33 | esp_restart(); 34 | } 35 | 36 | esp_timer_create_args_t restart_timer_args = { 37 | .callback = &restart_timer_callback, 38 | /* argument specified here will be passed to timer callback function */ 39 | .arg = (void*) 0, 40 | .name = "restart_timer" 41 | }; 42 | 43 | /* An HTTP GET handler */ 44 | static esp_err_t index_get_handler(httpd_req_t *req) 45 | { 46 | char* buf; 47 | size_t buf_len; 48 | 49 | /* Get header value string length and allocate memory for length + 1, 50 | * extra byte for null termination */ 51 | buf_len = httpd_req_get_hdr_value_len(req, "Host") + 1; 52 | if (buf_len > 1) { 53 | buf = malloc(buf_len); 54 | /* Copy null terminated value string into buffer */ 55 | if (httpd_req_get_hdr_value_str(req, "Host", buf, buf_len) == ESP_OK) { 56 | ESP_LOGI(TAG, "Found header => Host: %s", buf); 57 | } 58 | free(buf); 59 | } 60 | 61 | /* Read URL query string length and allocate memory for length + 1, 62 | * extra byte for null termination */ 63 | buf_len = httpd_req_get_url_query_len(req) + 1; 64 | if (buf_len > 1) { 65 | buf = malloc(buf_len); 66 | if (httpd_req_get_url_query_str(req, buf, buf_len) == ESP_OK) { 67 | ESP_LOGI(TAG, "Found URL query => %s", buf); 68 | if (strcmp(buf, "reset=Reboot") == 0) { 69 | esp_timer_start_once(restart_timer, 500000); 70 | } 71 | char param1[64]; 72 | char param2[64]; 73 | char param3[64]; 74 | char param4[64]; 75 | /* Get value of expected key from query string */ 76 | if (httpd_query_key_value(buf, "ap_ssid", param1, sizeof(param1)) == ESP_OK) { 77 | ESP_LOGI(TAG, "Found URL query parameter => ap_ssid=%s", param1); 78 | preprocess_string(param1); 79 | if (httpd_query_key_value(buf, "ap_password", param2, sizeof(param2)) == ESP_OK) { 80 | ESP_LOGI(TAG, "Found URL query parameter => ap_password=%s", param2); 81 | preprocess_string(param2); 82 | int argc = 3; 83 | char* argv[3]; 84 | argv[0] = "set_ap"; 85 | argv[1] = param1; 86 | argv[2] = param2; 87 | set_ap(argc, argv); 88 | esp_timer_start_once(restart_timer, 500000); 89 | } 90 | } 91 | if (httpd_query_key_value(buf, "ssid", param1, sizeof(param1)) == ESP_OK) { 92 | ESP_LOGI(TAG, "Found URL query parameter => ssid=%s", param1); 93 | preprocess_string(param1); 94 | if (httpd_query_key_value(buf, "password", param2, sizeof(param2)) == ESP_OK) { 95 | ESP_LOGI(TAG, "Found URL query parameter => password=%s", param2); 96 | preprocess_string(param2); 97 | if (httpd_query_key_value(buf, "ent_username", param3, sizeof(param3)) == ESP_OK) { 98 | ESP_LOGI(TAG, "Found URL query parameter => ent_username=%s", param3); 99 | preprocess_string(param3); 100 | if (httpd_query_key_value(buf, "ent_identity", param4, sizeof(param4)) == ESP_OK) { 101 | ESP_LOGI(TAG, "Found URL query parameter => ent_identity=%s", param4); 102 | preprocess_string(param4); 103 | int argc = 0; 104 | char* argv[7]; 105 | argv[argc++] = "set_sta"; 106 | //SSID 107 | argv[argc++] = param1; 108 | //Password 109 | argv[argc++] = param2; 110 | //Username 111 | if(strlen(param2)) { 112 | argv[argc++] = "-u"; 113 | argv[argc++] = param3; 114 | } 115 | //Identity 116 | if(strlen(param3)) { 117 | argv[argc++] = "-a"; 118 | argv[argc++] = param4; 119 | } 120 | 121 | set_sta(argc, argv); 122 | esp_timer_start_once(restart_timer, 500000); 123 | } 124 | } 125 | } 126 | } 127 | if (httpd_query_key_value(buf, "staticip", param1, sizeof(param1)) == ESP_OK) { 128 | ESP_LOGI(TAG, "Found URL query parameter => staticip=%s", param1); 129 | preprocess_string(param1); 130 | if (httpd_query_key_value(buf, "subnetmask", param2, sizeof(param2)) == ESP_OK) { 131 | ESP_LOGI(TAG, "Found URL query parameter => subnetmask=%s", param2); 132 | preprocess_string(param2); 133 | if (httpd_query_key_value(buf, "gateway", param3, sizeof(param3)) == ESP_OK) { 134 | ESP_LOGI(TAG, "Found URL query parameter => gateway=%s", param3); 135 | preprocess_string(param3); 136 | int argc = 4; 137 | char* argv[4]; 138 | argv[0] = "set_sta_static"; 139 | argv[1] = param1; 140 | argv[2] = param2; 141 | argv[3] = param3; 142 | set_sta_static(argc, argv); 143 | esp_timer_start_once(restart_timer, 500000); 144 | } 145 | } 146 | } 147 | } 148 | free(buf); 149 | } 150 | 151 | /* Send response with custom headers and body set as the 152 | * string passed in user context*/ 153 | const char* resp_str = (const char*) req->user_ctx; 154 | httpd_resp_send(req, resp_str, strlen(resp_str)); 155 | 156 | return ESP_OK; 157 | } 158 | 159 | static httpd_uri_t indexp = { 160 | .uri = "/", 161 | .method = HTTP_GET, 162 | .handler = index_get_handler, 163 | }; 164 | 165 | esp_err_t http_404_error_handler(httpd_req_t *req, httpd_err_code_t err) 166 | { 167 | httpd_resp_send_err(req, HTTPD_404_NOT_FOUND, "Page not found"); 168 | return ESP_FAIL; 169 | } 170 | 171 | char* html_escape(const char* src) { 172 | //Primitive html attribue escape, should handle most common issues. 173 | int len = strlen(src); 174 | //Every char in the string + a null 175 | int esc_len = len + 1; 176 | 177 | for (int i = 0; i < len; i++) { 178 | if (src[i] == '\\' || src[i] == '\'' || src[i] == '\"' || src[i] == '&' || src[i] == '#' || src[i] == ';') { 179 | //Will be replaced with a 5 char sequence 180 | esc_len += 4; 181 | } 182 | } 183 | 184 | char* res = malloc(sizeof(char) * esc_len); 185 | 186 | int j = 0; 187 | for (int i = 0; i < len; i++) { 188 | if (src[i] == '\\' || src[i] == '\'' || src[i] == '\"' || src[i] == '&' || src[i] == '#' || src[i] == ';') { 189 | res[j++] = '&'; 190 | res[j++] = '#'; 191 | res[j++] = '0' + (src[i] / 10); 192 | res[j++] = '0' + (src[i] % 10); 193 | res[j++] = ';'; 194 | } 195 | else { 196 | res[j++] = src[i]; 197 | } 198 | } 199 | res[j] = '\0'; 200 | 201 | return res; 202 | } 203 | 204 | httpd_handle_t start_webserver(void) 205 | { 206 | httpd_handle_t server = NULL; 207 | httpd_config_t config = HTTPD_DEFAULT_CONFIG(); 208 | 209 | const char* config_page_template = CONFIG_PAGE; 210 | 211 | char* safe_ap_ssid = html_escape(ap_ssid); 212 | char* safe_ap_passwd = html_escape(ap_passwd); 213 | char* safe_ssid = html_escape(ssid); 214 | char* safe_passwd = html_escape(passwd); 215 | char* safe_ent_username = html_escape(ent_username); 216 | char* safe_ent_identity = html_escape(ent_identity); 217 | 218 | int page_len = 219 | strlen(config_page_template) + 220 | strlen(safe_ap_ssid) + 221 | strlen(safe_ap_passwd) + 222 | strlen(safe_ssid) + 223 | strlen(safe_passwd) + 224 | strlen(safe_ent_username) + 225 | strlen(safe_ent_identity) + 226 | 256; 227 | char* config_page = malloc(sizeof(char) * page_len); 228 | 229 | snprintf( 230 | config_page, page_len, config_page_template, 231 | safe_ap_ssid, safe_ap_passwd, 232 | safe_ssid, safe_passwd, safe_ent_username, safe_ent_identity, 233 | static_ip, subnet_mask, gateway_addr); 234 | indexp.user_ctx = config_page; 235 | 236 | free(safe_ap_ssid); 237 | free(safe_ap_passwd); 238 | free(safe_ssid); 239 | free(safe_passwd); 240 | free(safe_ent_username); 241 | free(safe_ent_identity); 242 | 243 | esp_timer_create(&restart_timer_args, &restart_timer); 244 | 245 | // Start the httpd server 246 | ESP_LOGI(TAG, "Starting server on port: '%d'", config.server_port); 247 | if (httpd_start(&server, &config) == ESP_OK) { 248 | // Set URI handlers 249 | ESP_LOGI(TAG, "Registering URI handlers"); 250 | httpd_register_uri_handler(server, &indexp); 251 | return server; 252 | } 253 | 254 | ESP_LOGI(TAG, "Error starting server!"); 255 | return NULL; 256 | } 257 | 258 | static void stop_webserver(httpd_handle_t server) 259 | { 260 | // Stop the httpd server 261 | httpd_stop(server); 262 | } 263 | -------------------------------------------------------------------------------- /main/pages.h: -------------------------------------------------------------------------------- 1 | #define CONFIG_PAGE "\ 2 | \ 3 | \ 4 | \ 65 | \ 66 |
\ 67 |

ESP32 NAT Router Config

\ 68 | \ 76 |

AP Settings (the new network)

\ 77 |
\ 78 | \ 79 | \ 80 | \ 81 | \ 82 | \ 83 | \ 84 | \ 85 | \ 86 | \ 87 | \ 88 | \ 89 | \ 90 | \ 91 |
SSID
Password
\ 92 | \ 93 | Password less than 8 chars = open
\ 94 |
\ 95 |
\ 96 | \ 97 |

STA Settings (uplink WiFi network)

\ 98 |
\ 99 | \ 100 | \ 101 | \ 102 | \ 103 | \ 104 | \ 105 | \ 106 | \ 107 | \ 108 | \ 109 | \ 110 | \ 111 | \ 112 | \ 113 | \ 114 | \ 115 | \ 116 | \ 117 | \ 118 | \ 119 | \ 120 | \ 121 | \ 122 | \ 123 | \ 124 |
SSID
Password
WPA2 Enterprise settings. Leave blank for regular
Enterprise username
Enterprise identity
\ 125 |
\ 126 | \ 127 |

STA Static IP Settings

\ 128 |
\ 129 | \ 130 | \ 131 | \ 132 | \ 133 | \ 134 | \ 135 | \ 136 | \ 137 | \ 138 | \ 139 | \ 140 | \ 141 | \ 142 | \ 143 | \ 144 | \ 145 | \ 146 | \ 147 |
Static IP
Subnet Mask
Gateway
\ 148 | \ 149 | Leave it in blank if you want your ESP32 to get an IP using DHCP\ 150 | \ 151 |
\ 152 | \ 153 |

Device Management

\ 154 |
\ 155 | \ 156 | \ 157 | \ 158 | \ 159 | \ 160 |
Device
\ 161 |
\ 162 |
\ 163 | \ 164 | \ 165 | " 166 | 167 | #define LOCK_PAGE "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n\ 168 | \ 169 | \ 170 | \ 171 | \ 232 | \ 233 |
\ 234 |

ESP32 NAT Router Config

\ 235 | \ 243 |

Config Locked

\ 244 |
\ 245 | \ 246 | \ 247 | \ 248 | \ 249 | \ 250 | \ 251 | \ 252 | \ 253 | \ 254 | \ 255 |
Password:
\ 256 | \ 257 | Default: STA password to unlock
\ 258 |
\ 259 | \ 260 |
\ 261 | \ 262 | \ 263 | " -------------------------------------------------------------------------------- /partitions_example.csv: -------------------------------------------------------------------------------- 1 | # Name, Type, SubType, Offset, Size, Flags 2 | # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap 3 | nvs, data, nvs, 0x9000, 0x6000, 4 | phy_init, data, phy, 0xf000, 0x1000, 5 | factory, app, factory, 0x10000, 1M, 6 | storage, data, fat, , 1M, 7 | -------------------------------------------------------------------------------- /platformio.ini: -------------------------------------------------------------------------------- 1 | ; PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; https://docs.platformio.org/page/projectconf.html 10 | 11 | [platformio] 12 | src_dir = main 13 | 14 | [env:ttgo-lora32-v1] 15 | platform = espressif32 16 | framework = espidf 17 | board = ttgo-lora32-v1 18 | 19 | monitor_speed = 115200 20 | monitor_flags = --raw 21 | 22 | [env:esp32dev] 23 | platform = espressif32 24 | framework = espidf 25 | board = esp32dev 26 | 27 | monitor_speed = 115200 28 | monitor_flags = --raw 29 | 30 | [env:esp32-c3-devkitm-1] 31 | platform = espressif32 32 | board = esp32-c3-devkitm-1 33 | framework = espidf 34 | 35 | monitor_speed = 115200 36 | monitor_flags = --raw 37 | 38 | ; build_flags = -I C:\Users\Marci\.platformio\packages\framework-espidf\components\bt\host\bluedroid\api\include\api 39 | -------------------------------------------------------------------------------- /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_ARCH_XTENSA=y 7 | CONFIG_IDF_TARGET="esp32" 8 | CONFIG_IDF_TARGET_ESP32=y 9 | CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 10 | 11 | # 12 | # SDK tool configuration 13 | # 14 | CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-" 15 | # CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set 16 | # end of SDK tool configuration 17 | 18 | # 19 | # Build type 20 | # 21 | CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y 22 | # CONFIG_APP_BUILD_TYPE_ELF_RAM is not set 23 | CONFIG_APP_BUILD_GENERATE_BINARIES=y 24 | CONFIG_APP_BUILD_BOOTLOADER=y 25 | CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y 26 | # end of Build type 27 | 28 | # 29 | # Application manager 30 | # 31 | CONFIG_APP_COMPILE_TIME_DATE=y 32 | # CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set 33 | # CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set 34 | # CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set 35 | CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 36 | # end of Application manager 37 | 38 | # 39 | # Bootloader config 40 | # 41 | CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 42 | CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y 43 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set 44 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set 45 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set 46 | # CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set 47 | # CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set 48 | CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y 49 | # CONFIG_BOOTLOADER_LOG_LEVEL_INFO is not set 50 | # CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set 51 | # CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set 52 | CONFIG_BOOTLOADER_LOG_LEVEL=2 53 | # CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set 54 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y 55 | # CONFIG_BOOTLOADER_FACTORY_RESET is not set 56 | # CONFIG_BOOTLOADER_APP_TEST is not set 57 | CONFIG_BOOTLOADER_WDT_ENABLE=y 58 | # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set 59 | CONFIG_BOOTLOADER_WDT_TIME_MS=9000 60 | # CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set 61 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set 62 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set 63 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set 64 | CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 65 | # CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set 66 | # end of Bootloader config 67 | 68 | # 69 | # Security features 70 | # 71 | # CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set 72 | # CONFIG_SECURE_BOOT is not set 73 | # CONFIG_SECURE_FLASH_ENC_ENABLED is not set 74 | # end of Security features 75 | 76 | # 77 | # Serial flasher config 78 | # 79 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 80 | # CONFIG_ESPTOOLPY_NO_STUB is not set 81 | # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set 82 | # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set 83 | CONFIG_ESPTOOLPY_FLASHMODE_DIO=y 84 | # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set 85 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 86 | # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set 87 | CONFIG_ESPTOOLPY_FLASHFREQ_40M=y 88 | # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set 89 | # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set 90 | CONFIG_ESPTOOLPY_FLASHFREQ="40m" 91 | # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set 92 | # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set 93 | CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y 94 | # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set 95 | # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set 96 | CONFIG_ESPTOOLPY_FLASHSIZE="4MB" 97 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y 98 | CONFIG_ESPTOOLPY_BEFORE_RESET=y 99 | # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set 100 | CONFIG_ESPTOOLPY_BEFORE="default_reset" 101 | CONFIG_ESPTOOLPY_AFTER_RESET=y 102 | # CONFIG_ESPTOOLPY_AFTER_NORESET is not set 103 | CONFIG_ESPTOOLPY_AFTER="hard_reset" 104 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set 105 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set 106 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set 107 | CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y 108 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set 109 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set 110 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set 111 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set 112 | CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 113 | CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 114 | # end of Serial flasher config 115 | 116 | # 117 | # Partition Table 118 | # 119 | # CONFIG_PARTITION_TABLE_SINGLE_APP is not set 120 | # CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set 121 | # CONFIG_PARTITION_TABLE_TWO_OTA is not set 122 | CONFIG_PARTITION_TABLE_CUSTOM=y 123 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_example.csv" 124 | CONFIG_PARTITION_TABLE_FILENAME="partitions_example.csv" 125 | CONFIG_PARTITION_TABLE_OFFSET=0x8000 126 | CONFIG_PARTITION_TABLE_MD5=y 127 | # end of Partition Table 128 | 129 | # 130 | # Example Configuration 131 | # 132 | CONFIG_STORE_HISTORY=y 133 | # end of Example Configuration 134 | 135 | # 136 | # Compiler options 137 | # 138 | CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y 139 | # CONFIG_COMPILER_OPTIMIZATION_SIZE is not set 140 | # CONFIG_COMPILER_OPTIMIZATION_PERF is not set 141 | # CONFIG_COMPILER_OPTIMIZATION_NONE is not set 142 | CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y 143 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set 144 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set 145 | # CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set 146 | CONFIG_COMPILER_HIDE_PATHS_MACROS=y 147 | # CONFIG_COMPILER_CXX_EXCEPTIONS is not set 148 | # CONFIG_COMPILER_CXX_RTTI is not set 149 | CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y 150 | # CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set 151 | # CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set 152 | # CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set 153 | # CONFIG_COMPILER_WARN_WRITE_STRINGS is not set 154 | # CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set 155 | # CONFIG_COMPILER_DUMP_RTL_FILES is not set 156 | # end of Compiler options 157 | 158 | # 159 | # Component config 160 | # 161 | 162 | # 163 | # Application Level Tracing 164 | # 165 | # CONFIG_APPTRACE_DEST_TRAX is not set 166 | CONFIG_APPTRACE_DEST_NONE=y 167 | CONFIG_APPTRACE_LOCK_ENABLE=y 168 | # end of Application Level Tracing 169 | 170 | # 171 | # ESP-ASIO 172 | # 173 | # CONFIG_ASIO_SSL_SUPPORT is not set 174 | # end of ESP-ASIO 175 | 176 | # 177 | # Bluetooth 178 | # 179 | # CONFIG_BT_ENABLED is not set 180 | CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0 181 | CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0 182 | CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0 183 | CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=0 184 | CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=0 185 | CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0 186 | CONFIG_BTDM_CTRL_PINNED_TO_CORE=0 187 | CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1 188 | CONFIG_BT_CTRL_MODE_EFF=1 189 | CONFIG_BT_CTRL_BLE_MAX_ACT=10 190 | CONFIG_BT_CTRL_BLE_MAX_ACT_EFF=10 191 | CONFIG_BT_CTRL_BLE_STATIC_ACL_TX_BUF_NB=0 192 | CONFIG_BT_CTRL_PINNED_TO_CORE=0 193 | CONFIG_BT_CTRL_HCI_TL=1 194 | CONFIG_BT_CTRL_ADV_DUP_FILT_MAX=30 195 | CONFIG_BT_CTRL_HW_CCA_EFF=0 196 | CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=0 197 | CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y 198 | CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM=100 199 | CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 200 | CONFIG_BT_CTRL_BLE_SCAN_DUPL=y 201 | CONFIG_BT_CTRL_SCAN_DUPL_TYPE=0 202 | CONFIG_BT_CTRL_SCAN_DUPL_CACHE_SIZE=100 203 | CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF=0 204 | CONFIG_BT_CTRL_SLEEP_MODE_EFF=0 205 | CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0 206 | CONFIG_BT_CTRL_HCI_TL_EFF=1 207 | CONFIG_BT_RESERVE_DRAM=0 208 | # end of Bluetooth 209 | 210 | # 211 | # CoAP Configuration 212 | # 213 | CONFIG_COAP_MBEDTLS_PSK=y 214 | # CONFIG_COAP_MBEDTLS_PKI is not set 215 | # CONFIG_COAP_MBEDTLS_DEBUG is not set 216 | CONFIG_COAP_LOG_DEFAULT_LEVEL=0 217 | # end of CoAP Configuration 218 | 219 | # 220 | # Driver configurations 221 | # 222 | 223 | # 224 | # ADC configuration 225 | # 226 | # CONFIG_ADC_FORCE_XPD_FSM is not set 227 | CONFIG_ADC_DISABLE_DAC=y 228 | # end of ADC configuration 229 | 230 | # 231 | # SPI configuration 232 | # 233 | # CONFIG_SPI_MASTER_IN_IRAM is not set 234 | CONFIG_SPI_MASTER_ISR_IN_IRAM=y 235 | # CONFIG_SPI_SLAVE_IN_IRAM is not set 236 | CONFIG_SPI_SLAVE_ISR_IN_IRAM=y 237 | # end of SPI configuration 238 | 239 | # 240 | # TWAI configuration 241 | # 242 | # CONFIG_TWAI_ISR_IN_IRAM is not set 243 | # CONFIG_TWAI_ERRATA_FIX_BUS_OFF_REC is not set 244 | # CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST is not set 245 | # CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID is not set 246 | # CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT is not set 247 | # end of TWAI configuration 248 | 249 | # 250 | # UART configuration 251 | # 252 | # CONFIG_UART_ISR_IN_IRAM is not set 253 | # end of UART configuration 254 | 255 | # 256 | # RTCIO configuration 257 | # 258 | # CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set 259 | # end of RTCIO configuration 260 | 261 | # 262 | # GPIO Configuration 263 | # 264 | # CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set 265 | # end of GPIO Configuration 266 | # end of Driver configurations 267 | 268 | # 269 | # eFuse Bit Manager 270 | # 271 | # CONFIG_EFUSE_CUSTOM_TABLE is not set 272 | # CONFIG_EFUSE_VIRTUAL is not set 273 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set 274 | CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y 275 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set 276 | CONFIG_EFUSE_MAX_BLK_LEN=192 277 | # end of eFuse Bit Manager 278 | 279 | # 280 | # ESP-TLS 281 | # 282 | CONFIG_ESP_TLS_USING_MBEDTLS=y 283 | # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set 284 | # CONFIG_ESP_TLS_SERVER is not set 285 | # CONFIG_ESP_TLS_PSK_VERIFICATION is not set 286 | # CONFIG_ESP_TLS_INSECURE is not set 287 | # end of ESP-TLS 288 | 289 | # 290 | # ESP32-specific 291 | # 292 | CONFIG_ESP32_REV_MIN_0=y 293 | # CONFIG_ESP32_REV_MIN_1 is not set 294 | # CONFIG_ESP32_REV_MIN_2 is not set 295 | # CONFIG_ESP32_REV_MIN_3 is not set 296 | CONFIG_ESP32_REV_MIN=0 297 | CONFIG_ESP32_DPORT_WORKAROUND=y 298 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set 299 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set 300 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y 301 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 302 | # CONFIG_ESP32_SPIRAM_SUPPORT is not set 303 | # CONFIG_ESP32_TRAX is not set 304 | CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 305 | # CONFIG_ESP32_ULP_COPROC_ENABLED is not set 306 | CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 307 | CONFIG_ESP32_DEBUG_OCDAWARE=y 308 | CONFIG_ESP32_BROWNOUT_DET=y 309 | CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y 310 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set 311 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set 312 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set 313 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set 314 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set 315 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set 316 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set 317 | CONFIG_ESP32_BROWNOUT_DET_LVL=0 318 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y 319 | # CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set 320 | # CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set 321 | # CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set 322 | CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y 323 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set 324 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set 325 | # CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set 326 | CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 327 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 328 | CONFIG_ESP32_XTAL_FREQ_40=y 329 | # CONFIG_ESP32_XTAL_FREQ_26 is not set 330 | # CONFIG_ESP32_XTAL_FREQ_AUTO is not set 331 | CONFIG_ESP32_XTAL_FREQ=40 332 | # CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set 333 | # CONFIG_ESP32_NO_BLOBS is not set 334 | # CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set 335 | # CONFIG_ESP32_COMPATIBLE_PRE_V3_1_BOOTLOADERS is not set 336 | # CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set 337 | CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 338 | # end of ESP32-specific 339 | 340 | # 341 | # ADC-Calibration 342 | # 343 | CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y 344 | CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y 345 | CONFIG_ADC_CAL_LUT_ENABLE=y 346 | # end of ADC-Calibration 347 | 348 | # 349 | # Common ESP-related 350 | # 351 | CONFIG_ESP_ERR_TO_NAME_LOOKUP=y 352 | # end of Common ESP-related 353 | 354 | # 355 | # Ethernet 356 | # 357 | CONFIG_ETH_ENABLED=y 358 | CONFIG_ETH_USE_ESP32_EMAC=y 359 | CONFIG_ETH_PHY_INTERFACE_RMII=y 360 | # CONFIG_ETH_PHY_INTERFACE_MII is not set 361 | CONFIG_ETH_RMII_CLK_INPUT=y 362 | # CONFIG_ETH_RMII_CLK_OUTPUT is not set 363 | CONFIG_ETH_RMII_CLK_IN_GPIO=0 364 | CONFIG_ETH_DMA_BUFFER_SIZE=512 365 | CONFIG_ETH_DMA_RX_BUFFER_NUM=10 366 | CONFIG_ETH_DMA_TX_BUFFER_NUM=10 367 | CONFIG_ETH_USE_SPI_ETHERNET=y 368 | # CONFIG_ETH_SPI_ETHERNET_DM9051 is not set 369 | # CONFIG_ETH_SPI_ETHERNET_W5500 is not set 370 | # CONFIG_ETH_SPI_ETHERNET_KSZ8851SNL is not set 371 | # CONFIG_ETH_USE_OPENETH is not set 372 | # end of Ethernet 373 | 374 | # 375 | # Event Loop Library 376 | # 377 | # CONFIG_ESP_EVENT_LOOP_PROFILING is not set 378 | CONFIG_ESP_EVENT_POST_FROM_ISR=y 379 | CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y 380 | # end of Event Loop Library 381 | 382 | # 383 | # GDB Stub 384 | # 385 | # end of GDB Stub 386 | 387 | # 388 | # ESP HTTP client 389 | # 390 | CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y 391 | # CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set 392 | CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH=y 393 | # end of ESP HTTP client 394 | 395 | # 396 | # HTTP Server 397 | # 398 | CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 399 | CONFIG_HTTPD_MAX_URI_LEN=512 400 | CONFIG_HTTPD_ERR_RESP_NO_DELAY=y 401 | CONFIG_HTTPD_PURGE_BUF_LEN=32 402 | # CONFIG_HTTPD_LOG_PURGE_DATA is not set 403 | # CONFIG_HTTPD_WS_SUPPORT is not set 404 | # end of HTTP Server 405 | 406 | # 407 | # ESP HTTPS OTA 408 | # 409 | # CONFIG_OTA_ALLOW_HTTP is not set 410 | # end of ESP HTTPS OTA 411 | 412 | # 413 | # ESP HTTPS server 414 | # 415 | # CONFIG_ESP_HTTPS_SERVER_ENABLE is not set 416 | # end of ESP HTTPS server 417 | 418 | # 419 | # Hardware Settings 420 | # 421 | 422 | # 423 | # MAC Config 424 | # 425 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y 426 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y 427 | CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y 428 | CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y 429 | # CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set 430 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y 431 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 432 | # end of MAC Config 433 | 434 | # 435 | # Sleep Config 436 | # 437 | CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y 438 | # end of Sleep Config 439 | # end of Hardware Settings 440 | 441 | # 442 | # LCD and Touch Panel 443 | # 444 | # end of LCD and Touch Panel 445 | 446 | # 447 | # ESP NETIF Adapter 448 | # 449 | CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 450 | CONFIG_ESP_NETIF_TCPIP_LWIP=y 451 | # CONFIG_ESP_NETIF_LOOPBACK is not set 452 | CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y 453 | # end of ESP NETIF Adapter 454 | 455 | # 456 | # PHY 457 | # 458 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y 459 | # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set 460 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 461 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 462 | CONFIG_ESP32_REDUCE_PHY_TX_POWER=y 463 | # end of PHY 464 | 465 | # 466 | # Power Management 467 | # 468 | # CONFIG_PM_ENABLE is not set 469 | # end of Power Management 470 | 471 | # 472 | # ESP System Settings 473 | # 474 | # CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set 475 | CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y 476 | # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set 477 | # CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set 478 | # CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set 479 | 480 | # 481 | # Memory protection 482 | # 483 | # end of Memory protection 484 | 485 | CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 486 | CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 487 | CONFIG_ESP_MAIN_TASK_STACK_SIZE=7168 488 | CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y 489 | # CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1 is not set 490 | # CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set 491 | CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 492 | CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 493 | CONFIG_ESP_CONSOLE_UART_DEFAULT=y 494 | # CONFIG_ESP_CONSOLE_UART_CUSTOM is not set 495 | # CONFIG_ESP_CONSOLE_NONE is not set 496 | CONFIG_ESP_CONSOLE_UART=y 497 | CONFIG_ESP_CONSOLE_MULTIPLE_UART=y 498 | CONFIG_ESP_CONSOLE_UART_NUM=0 499 | CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 500 | CONFIG_ESP_INT_WDT=y 501 | CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 502 | CONFIG_ESP_INT_WDT_CHECK_CPU1=y 503 | CONFIG_ESP_TASK_WDT=y 504 | # CONFIG_ESP_TASK_WDT_PANIC is not set 505 | CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 506 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 507 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 508 | CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 509 | CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y 510 | # CONFIG_ESP_PANIC_HANDLER_IRAM is not set 511 | # end of ESP System Settings 512 | 513 | # 514 | # High resolution timer (esp_timer) 515 | # 516 | # CONFIG_ESP_TIMER_PROFILING is not set 517 | CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y 518 | CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y 519 | CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 520 | CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 521 | # CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set 522 | # CONFIG_ESP_TIMER_IMPL_FRC2 is not set 523 | CONFIG_ESP_TIMER_IMPL_TG0_LAC=y 524 | # end of High resolution timer (esp_timer) 525 | 526 | # 527 | # Wi-Fi 528 | # 529 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 530 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 531 | # CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set 532 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y 533 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 534 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 535 | # CONFIG_ESP32_WIFI_CSI_ENABLED is not set 536 | CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y 537 | CONFIG_ESP32_WIFI_TX_BA_WIN=6 538 | CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y 539 | CONFIG_ESP32_WIFI_RX_BA_WIN=6 540 | CONFIG_ESP32_WIFI_NVS_ENABLED=y 541 | CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y 542 | # CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set 543 | CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 544 | CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 545 | # CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE is not set 546 | CONFIG_ESP32_WIFI_IRAM_OPT=y 547 | CONFIG_ESP32_WIFI_RX_IRAM_OPT=y 548 | CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y 549 | # CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set 550 | # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set 551 | # end of Wi-Fi 552 | 553 | # 554 | # Core dump 555 | # 556 | # CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set 557 | # CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set 558 | CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y 559 | # end of Core dump 560 | 561 | # 562 | # FAT Filesystem support 563 | # 564 | # CONFIG_FATFS_CODEPAGE_DYNAMIC is not set 565 | CONFIG_FATFS_CODEPAGE_437=y 566 | # CONFIG_FATFS_CODEPAGE_720 is not set 567 | # CONFIG_FATFS_CODEPAGE_737 is not set 568 | # CONFIG_FATFS_CODEPAGE_771 is not set 569 | # CONFIG_FATFS_CODEPAGE_775 is not set 570 | # CONFIG_FATFS_CODEPAGE_850 is not set 571 | # CONFIG_FATFS_CODEPAGE_852 is not set 572 | # CONFIG_FATFS_CODEPAGE_855 is not set 573 | # CONFIG_FATFS_CODEPAGE_857 is not set 574 | # CONFIG_FATFS_CODEPAGE_860 is not set 575 | # CONFIG_FATFS_CODEPAGE_861 is not set 576 | # CONFIG_FATFS_CODEPAGE_862 is not set 577 | # CONFIG_FATFS_CODEPAGE_863 is not set 578 | # CONFIG_FATFS_CODEPAGE_864 is not set 579 | # CONFIG_FATFS_CODEPAGE_865 is not set 580 | # CONFIG_FATFS_CODEPAGE_866 is not set 581 | # CONFIG_FATFS_CODEPAGE_869 is not set 582 | # CONFIG_FATFS_CODEPAGE_932 is not set 583 | # CONFIG_FATFS_CODEPAGE_936 is not set 584 | # CONFIG_FATFS_CODEPAGE_949 is not set 585 | # CONFIG_FATFS_CODEPAGE_950 is not set 586 | CONFIG_FATFS_CODEPAGE=437 587 | CONFIG_FATFS_LFN_NONE=y 588 | # CONFIG_FATFS_LFN_HEAP is not set 589 | # CONFIG_FATFS_LFN_STACK is not set 590 | CONFIG_FATFS_FS_LOCK=0 591 | CONFIG_FATFS_TIMEOUT_MS=10000 592 | CONFIG_FATFS_PER_FILE_CACHE=y 593 | # CONFIG_FATFS_USE_FASTSEEK is not set 594 | # end of FAT Filesystem support 595 | 596 | # 597 | # Modbus configuration 598 | # 599 | CONFIG_FMB_COMM_MODE_TCP_EN=y 600 | CONFIG_FMB_TCP_PORT_DEFAULT=502 601 | CONFIG_FMB_TCP_PORT_MAX_CONN=5 602 | CONFIG_FMB_TCP_CONNECTION_TOUT_SEC=20 603 | CONFIG_FMB_COMM_MODE_RTU_EN=y 604 | CONFIG_FMB_COMM_MODE_ASCII_EN=y 605 | CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 606 | CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 607 | CONFIG_FMB_QUEUE_LENGTH=20 608 | CONFIG_FMB_PORT_TASK_STACK_SIZE=4096 609 | CONFIG_FMB_SERIAL_BUF_SIZE=256 610 | CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 611 | CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 612 | CONFIG_FMB_PORT_TASK_PRIO=10 613 | CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=y 614 | CONFIG_FMB_CONTROLLER_SLAVE_ID=0x00112233 615 | CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 616 | CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 617 | CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 618 | CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 619 | CONFIG_FMB_TIMER_PORT_ENABLED=y 620 | CONFIG_FMB_TIMER_GROUP=0 621 | CONFIG_FMB_TIMER_INDEX=0 622 | # CONFIG_FMB_TIMER_ISR_IN_IRAM is not set 623 | # end of Modbus configuration 624 | 625 | # 626 | # FreeRTOS 627 | # 628 | # CONFIG_FREERTOS_UNICORE is not set 629 | CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF 630 | CONFIG_FREERTOS_CORETIMER_0=y 631 | # CONFIG_FREERTOS_CORETIMER_1 is not set 632 | CONFIG_FREERTOS_HZ=100 633 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y 634 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set 635 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set 636 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y 637 | # CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set 638 | CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y 639 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 640 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 641 | # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set 642 | # CONFIG_FREERTOS_ASSERT_DISABLE is not set 643 | CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 644 | CONFIG_FREERTOS_ISR_STACKSIZE=1536 645 | # CONFIG_FREERTOS_LEGACY_HOOKS is not set 646 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 647 | CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y 648 | # CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set 649 | CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 650 | CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 651 | CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 652 | CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 653 | CONFIG_FREERTOS_USE_TRACE_FACILITY=y 654 | CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y 655 | # CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID is not set 656 | # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set 657 | CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y 658 | CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y 659 | # CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set 660 | # CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set 661 | CONFIG_FREERTOS_DEBUG_OCDAWARE=y 662 | # CONFIG_FREERTOS_FPU_IN_ISR is not set 663 | # end of FreeRTOS 664 | 665 | # 666 | # Heap memory debugging 667 | # 668 | CONFIG_HEAP_POISONING_DISABLED=y 669 | # CONFIG_HEAP_POISONING_LIGHT is not set 670 | # CONFIG_HEAP_POISONING_COMPREHENSIVE is not set 671 | CONFIG_HEAP_TRACING_OFF=y 672 | # CONFIG_HEAP_TRACING_STANDALONE is not set 673 | # CONFIG_HEAP_TRACING_TOHOST is not set 674 | # CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set 675 | # end of Heap memory debugging 676 | 677 | # 678 | # jsmn 679 | # 680 | # CONFIG_JSMN_PARENT_LINKS is not set 681 | # CONFIG_JSMN_STRICT is not set 682 | # end of jsmn 683 | 684 | # 685 | # libsodium 686 | # 687 | # end of libsodium 688 | 689 | # 690 | # Log output 691 | # 692 | # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set 693 | # CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set 694 | # CONFIG_LOG_DEFAULT_LEVEL_WARN is not set 695 | CONFIG_LOG_DEFAULT_LEVEL_INFO=y 696 | # CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set 697 | # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set 698 | CONFIG_LOG_DEFAULT_LEVEL=3 699 | CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y 700 | # CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set 701 | # CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set 702 | CONFIG_LOG_MAXIMUM_LEVEL=3 703 | CONFIG_LOG_COLORS=y 704 | CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y 705 | # CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set 706 | # end of Log output 707 | 708 | # 709 | # LWIP 710 | # 711 | CONFIG_LWIP_LOCAL_HOSTNAME="espressif" 712 | # CONFIG_LWIP_NETIF_API is not set 713 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y 714 | CONFIG_LWIP_L2_TO_L3_COPY=y 715 | # CONFIG_LWIP_IRAM_OPTIMIZATION is not set 716 | CONFIG_LWIP_TIMERS_ONDEMAND=y 717 | CONFIG_LWIP_MAX_SOCKETS=10 718 | # CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set 719 | # CONFIG_LWIP_SO_LINGER is not set 720 | CONFIG_LWIP_SO_REUSE=y 721 | CONFIG_LWIP_SO_REUSE_RXTOALL=y 722 | # CONFIG_LWIP_SO_RCVBUF is not set 723 | # CONFIG_LWIP_NETBUF_RECVINFO is not set 724 | CONFIG_LWIP_IP4_FRAG=y 725 | CONFIG_LWIP_IP6_FRAG=y 726 | # CONFIG_LWIP_IP4_REASSEMBLY is not set 727 | # CONFIG_LWIP_IP6_REASSEMBLY is not set 728 | CONFIG_LWIP_IP_FORWARD=y 729 | CONFIG_LWIP_IPV4_NAPT=y 730 | # CONFIG_LWIP_STATS is not set 731 | # CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set 732 | CONFIG_LWIP_ESP_GRATUITOUS_ARP=y 733 | CONFIG_LWIP_GARP_TMR_INTERVAL=60 734 | CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 735 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y 736 | # CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set 737 | # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set 738 | 739 | # 740 | # DHCP server 741 | # 742 | CONFIG_LWIP_DHCPS_LEASE_UNIT=60 743 | CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 744 | # end of DHCP server 745 | 746 | # CONFIG_LWIP_AUTOIP is not set 747 | CONFIG_LWIP_IPV6=y 748 | # CONFIG_LWIP_IPV6_AUTOCONFIG is not set 749 | CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 750 | # CONFIG_LWIP_IPV6_FORWARD is not set 751 | # CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set 752 | CONFIG_LWIP_NETIF_LOOPBACK=y 753 | CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 754 | 755 | # 756 | # TCP 757 | # 758 | CONFIG_LWIP_MAX_ACTIVE_TCP=16 759 | CONFIG_LWIP_MAX_LISTENING_TCP=16 760 | CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y 761 | CONFIG_LWIP_TCP_MAXRTX=12 762 | CONFIG_LWIP_TCP_SYNMAXRTX=12 763 | CONFIG_LWIP_TCP_MSS=1440 764 | CONFIG_LWIP_TCP_TMR_INTERVAL=250 765 | CONFIG_LWIP_TCP_MSL=60000 766 | CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 767 | CONFIG_LWIP_TCP_WND_DEFAULT=5744 768 | CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 769 | CONFIG_LWIP_TCP_QUEUE_OOSEQ=y 770 | # CONFIG_LWIP_TCP_SACK_OUT is not set 771 | # CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set 772 | CONFIG_LWIP_TCP_OVERSIZE_MSS=y 773 | # CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set 774 | # CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set 775 | CONFIG_LWIP_TCP_RTO_TIME=1500 776 | # end of TCP 777 | 778 | # 779 | # UDP 780 | # 781 | CONFIG_LWIP_MAX_UDP_PCBS=16 782 | CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 783 | # end of UDP 784 | 785 | # 786 | # Checksums 787 | # 788 | # CONFIG_LWIP_CHECKSUM_CHECK_IP is not set 789 | # CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set 790 | CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y 791 | # end of Checksums 792 | 793 | CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 794 | CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 795 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set 796 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set 797 | CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF 798 | # CONFIG_LWIP_PPP_SUPPORT is not set 799 | CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 800 | CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 801 | # CONFIG_LWIP_SLIP_SUPPORT is not set 802 | 803 | # 804 | # ICMP 805 | # 806 | # CONFIG_LWIP_MULTICAST_PING is not set 807 | # CONFIG_LWIP_BROADCAST_PING is not set 808 | # end of ICMP 809 | 810 | # 811 | # LWIP RAW API 812 | # 813 | CONFIG_LWIP_MAX_RAW_PCBS=16 814 | # end of LWIP RAW API 815 | 816 | # 817 | # SNTP 818 | # 819 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 820 | CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 821 | # end of SNTP 822 | 823 | CONFIG_LWIP_ESP_LWIP_ASSERT=y 824 | 825 | # 826 | # Hooks 827 | # 828 | # CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set 829 | CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y 830 | # CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set 831 | CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y 832 | # CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set 833 | # CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set 834 | CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y 835 | # CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set 836 | # CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set 837 | CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y 838 | # CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set 839 | # CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set 840 | # end of Hooks 841 | 842 | # CONFIG_LWIP_DEBUG is not set 843 | # end of LWIP 844 | 845 | # 846 | # mbedTLS 847 | # 848 | CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y 849 | # CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set 850 | # CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set 851 | CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y 852 | CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 853 | CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 854 | # CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set 855 | # CONFIG_MBEDTLS_DEBUG is not set 856 | 857 | # 858 | # Certificate Bundle 859 | # 860 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y 861 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y 862 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set 863 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set 864 | # CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set 865 | # end of Certificate Bundle 866 | 867 | # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set 868 | # CONFIG_MBEDTLS_CMAC_C is not set 869 | CONFIG_MBEDTLS_HARDWARE_AES=y 870 | CONFIG_MBEDTLS_HARDWARE_MPI=y 871 | CONFIG_MBEDTLS_HARDWARE_SHA=y 872 | CONFIG_MBEDTLS_ROM_MD5=y 873 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set 874 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set 875 | CONFIG_MBEDTLS_HAVE_TIME=y 876 | # CONFIG_MBEDTLS_HAVE_TIME_DATE is not set 877 | CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y 878 | CONFIG_MBEDTLS_SHA512_C=y 879 | CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y 880 | # CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set 881 | # CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set 882 | # CONFIG_MBEDTLS_TLS_DISABLED is not set 883 | CONFIG_MBEDTLS_TLS_SERVER=y 884 | CONFIG_MBEDTLS_TLS_CLIENT=y 885 | CONFIG_MBEDTLS_TLS_ENABLED=y 886 | 887 | # 888 | # TLS Key Exchange Methods 889 | # 890 | # CONFIG_MBEDTLS_PSK_MODES is not set 891 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y 892 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y 893 | CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y 894 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y 895 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y 896 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y 897 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y 898 | # end of TLS Key Exchange Methods 899 | 900 | CONFIG_MBEDTLS_SSL_RENEGOTIATION=y 901 | # CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set 902 | CONFIG_MBEDTLS_SSL_PROTO_TLS1=y 903 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y 904 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y 905 | # CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set 906 | CONFIG_MBEDTLS_SSL_ALPN=y 907 | CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y 908 | CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y 909 | 910 | # 911 | # Symmetric Ciphers 912 | # 913 | CONFIG_MBEDTLS_AES_C=y 914 | # CONFIG_MBEDTLS_CAMELLIA_C is not set 915 | # CONFIG_MBEDTLS_DES_C is not set 916 | CONFIG_MBEDTLS_RC4_DISABLED=y 917 | # CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set 918 | # CONFIG_MBEDTLS_RC4_ENABLED is not set 919 | # CONFIG_MBEDTLS_BLOWFISH_C is not set 920 | # CONFIG_MBEDTLS_XTEA_C is not set 921 | CONFIG_MBEDTLS_CCM_C=y 922 | CONFIG_MBEDTLS_GCM_C=y 923 | # CONFIG_MBEDTLS_NIST_KW_C is not set 924 | # end of Symmetric Ciphers 925 | 926 | # CONFIG_MBEDTLS_RIPEMD160_C is not set 927 | 928 | # 929 | # Certificates 930 | # 931 | CONFIG_MBEDTLS_PEM_PARSE_C=y 932 | CONFIG_MBEDTLS_PEM_WRITE_C=y 933 | CONFIG_MBEDTLS_X509_CRL_PARSE_C=y 934 | CONFIG_MBEDTLS_X509_CSR_PARSE_C=y 935 | # end of Certificates 936 | 937 | CONFIG_MBEDTLS_ECP_C=y 938 | CONFIG_MBEDTLS_ECDH_C=y 939 | CONFIG_MBEDTLS_ECDSA_C=y 940 | # CONFIG_MBEDTLS_ECJPAKE_C is not set 941 | CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y 942 | CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y 943 | CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y 944 | CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y 945 | CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y 946 | CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y 947 | CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y 948 | CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y 949 | CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y 950 | CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y 951 | CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y 952 | CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y 953 | CONFIG_MBEDTLS_ECP_NIST_OPTIM=y 954 | # CONFIG_MBEDTLS_POLY1305_C is not set 955 | # CONFIG_MBEDTLS_CHACHA20_C is not set 956 | # CONFIG_MBEDTLS_HKDF_C is not set 957 | # CONFIG_MBEDTLS_THREADING_C is not set 958 | # CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set 959 | # CONFIG_MBEDTLS_SECURITY_RISKS is not set 960 | # end of mbedTLS 961 | 962 | # 963 | # mDNS 964 | # 965 | CONFIG_MDNS_MAX_SERVICES=10 966 | CONFIG_MDNS_TASK_PRIORITY=1 967 | CONFIG_MDNS_TASK_STACK_SIZE=4096 968 | # CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set 969 | CONFIG_MDNS_TASK_AFFINITY_CPU0=y 970 | # CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set 971 | CONFIG_MDNS_TASK_AFFINITY=0x0 972 | CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 973 | # CONFIG_MDNS_STRICT_MODE is not set 974 | CONFIG_MDNS_TIMER_PERIOD_MS=100 975 | # end of mDNS 976 | 977 | # 978 | # ESP-MQTT Configurations 979 | # 980 | CONFIG_MQTT_PROTOCOL_311=y 981 | CONFIG_MQTT_TRANSPORT_SSL=y 982 | CONFIG_MQTT_TRANSPORT_WEBSOCKET=y 983 | CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y 984 | # CONFIG_MQTT_MSG_ID_INCREMENTAL is not set 985 | # CONFIG_MQTT_SKIP_PUBLISH_IF_DISCONNECTED is not set 986 | # CONFIG_MQTT_REPORT_DELETED_MESSAGES is not set 987 | # CONFIG_MQTT_USE_CUSTOM_CONFIG is not set 988 | # CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set 989 | # CONFIG_MQTT_CUSTOM_OUTBOX is not set 990 | # end of ESP-MQTT Configurations 991 | 992 | # 993 | # Newlib 994 | # 995 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y 996 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set 997 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set 998 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set 999 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set 1000 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y 1001 | # CONFIG_NEWLIB_NANO_FORMAT is not set 1002 | # end of Newlib 1003 | 1004 | # 1005 | # NVS 1006 | # 1007 | # end of NVS 1008 | 1009 | # 1010 | # OpenSSL 1011 | # 1012 | # CONFIG_OPENSSL_DEBUG is not set 1013 | CONFIG_OPENSSL_ERROR_STACK=y 1014 | # CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set 1015 | CONFIG_OPENSSL_ASSERT_EXIT=y 1016 | # end of OpenSSL 1017 | 1018 | # 1019 | # OpenThread 1020 | # 1021 | # CONFIG_OPENTHREAD_ENABLED is not set 1022 | # end of OpenThread 1023 | 1024 | # 1025 | # PThreads 1026 | # 1027 | CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 1028 | CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 1029 | CONFIG_PTHREAD_STACK_MIN=768 1030 | CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y 1031 | # CONFIG_PTHREAD_DEFAULT_CORE_0 is not set 1032 | # CONFIG_PTHREAD_DEFAULT_CORE_1 is not set 1033 | CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 1034 | CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" 1035 | # end of PThreads 1036 | 1037 | # 1038 | # SPI Flash driver 1039 | # 1040 | # CONFIG_SPI_FLASH_VERIFY_WRITE is not set 1041 | # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set 1042 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y 1043 | CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y 1044 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set 1045 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set 1046 | # CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set 1047 | # CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set 1048 | # CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set 1049 | CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y 1050 | CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 1051 | CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 1052 | CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 1053 | # CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set 1054 | # CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set 1055 | # CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set 1056 | 1057 | # 1058 | # Auto-detect flash chips 1059 | # 1060 | CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y 1061 | CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y 1062 | CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y 1063 | CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y 1064 | # end of Auto-detect flash chips 1065 | 1066 | CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y 1067 | # end of SPI Flash driver 1068 | 1069 | # 1070 | # SPIFFS Configuration 1071 | # 1072 | CONFIG_SPIFFS_MAX_PARTITIONS=3 1073 | 1074 | # 1075 | # SPIFFS Cache Configuration 1076 | # 1077 | CONFIG_SPIFFS_CACHE=y 1078 | CONFIG_SPIFFS_CACHE_WR=y 1079 | # CONFIG_SPIFFS_CACHE_STATS is not set 1080 | # end of SPIFFS Cache Configuration 1081 | 1082 | CONFIG_SPIFFS_PAGE_CHECK=y 1083 | CONFIG_SPIFFS_GC_MAX_RUNS=10 1084 | # CONFIG_SPIFFS_GC_STATS is not set 1085 | CONFIG_SPIFFS_PAGE_SIZE=256 1086 | CONFIG_SPIFFS_OBJ_NAME_LEN=32 1087 | # CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set 1088 | CONFIG_SPIFFS_USE_MAGIC=y 1089 | CONFIG_SPIFFS_USE_MAGIC_LENGTH=y 1090 | CONFIG_SPIFFS_META_LENGTH=4 1091 | CONFIG_SPIFFS_USE_MTIME=y 1092 | 1093 | # 1094 | # Debug Configuration 1095 | # 1096 | # CONFIG_SPIFFS_DBG is not set 1097 | # CONFIG_SPIFFS_API_DBG is not set 1098 | # CONFIG_SPIFFS_GC_DBG is not set 1099 | # CONFIG_SPIFFS_CACHE_DBG is not set 1100 | # CONFIG_SPIFFS_CHECK_DBG is not set 1101 | # CONFIG_SPIFFS_TEST_VISUALISATION is not set 1102 | # end of Debug Configuration 1103 | # end of SPIFFS Configuration 1104 | 1105 | # 1106 | # TCP Transport 1107 | # 1108 | CONFIG_WS_BUFFER_SIZE=1024 1109 | # end of TCP Transport 1110 | 1111 | # 1112 | # TinyUSB 1113 | # 1114 | # end of TinyUSB 1115 | 1116 | # 1117 | # Unity unit testing library 1118 | # 1119 | CONFIG_UNITY_ENABLE_FLOAT=y 1120 | CONFIG_UNITY_ENABLE_DOUBLE=y 1121 | # CONFIG_UNITY_ENABLE_64BIT is not set 1122 | # CONFIG_UNITY_ENABLE_COLOR is not set 1123 | CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y 1124 | # CONFIG_UNITY_ENABLE_FIXTURE is not set 1125 | # CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set 1126 | # end of Unity unit testing library 1127 | 1128 | # 1129 | # Virtual file system 1130 | # 1131 | CONFIG_VFS_SUPPORT_IO=y 1132 | CONFIG_VFS_SUPPORT_DIR=y 1133 | CONFIG_VFS_SUPPORT_SELECT=y 1134 | CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y 1135 | CONFIG_VFS_SUPPORT_TERMIOS=y 1136 | 1137 | # 1138 | # Host File System I/O (Semihosting) 1139 | # 1140 | CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 1141 | CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 1142 | # end of Host File System I/O (Semihosting) 1143 | # end of Virtual file system 1144 | 1145 | # 1146 | # Wear Levelling 1147 | # 1148 | # CONFIG_WL_SECTOR_SIZE_512 is not set 1149 | CONFIG_WL_SECTOR_SIZE_4096=y 1150 | CONFIG_WL_SECTOR_SIZE=4096 1151 | # end of Wear Levelling 1152 | 1153 | # 1154 | # Wi-Fi Provisioning Manager 1155 | # 1156 | CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 1157 | CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 1158 | # end of Wi-Fi Provisioning Manager 1159 | 1160 | # 1161 | # Supplicant 1162 | # 1163 | CONFIG_WPA_MBEDTLS_CRYPTO=y 1164 | # CONFIG_WPA_WAPI_PSK is not set 1165 | # CONFIG_WPA_DEBUG_PRINT is not set 1166 | # CONFIG_WPA_TESTING_OPTIONS is not set 1167 | # CONFIG_WPA_WPS_WARS is not set 1168 | # CONFIG_WPA_11KV_SUPPORT is not set 1169 | # end of Supplicant 1170 | # end of Component config 1171 | 1172 | # 1173 | # Compatibility options 1174 | # 1175 | # CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set 1176 | # end of Compatibility options 1177 | 1178 | # Deprecated options for backward compatibility 1179 | CONFIG_TOOLPREFIX="xtensa-esp32-elf-" 1180 | # CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set 1181 | # CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set 1182 | CONFIG_LOG_BOOTLOADER_LEVEL_WARN=y 1183 | # CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set 1184 | # CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set 1185 | # CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set 1186 | CONFIG_LOG_BOOTLOADER_LEVEL=2 1187 | # CONFIG_APP_ROLLBACK_ENABLE is not set 1188 | # CONFIG_FLASH_ENCRYPTION_ENABLED is not set 1189 | # CONFIG_FLASHMODE_QIO is not set 1190 | # CONFIG_FLASHMODE_QOUT is not set 1191 | CONFIG_FLASHMODE_DIO=y 1192 | # CONFIG_FLASHMODE_DOUT is not set 1193 | # CONFIG_MONITOR_BAUD_9600B is not set 1194 | # CONFIG_MONITOR_BAUD_57600B is not set 1195 | CONFIG_MONITOR_BAUD_115200B=y 1196 | # CONFIG_MONITOR_BAUD_230400B is not set 1197 | # CONFIG_MONITOR_BAUD_921600B is not set 1198 | # CONFIG_MONITOR_BAUD_2MB is not set 1199 | # CONFIG_MONITOR_BAUD_OTHER is not set 1200 | CONFIG_MONITOR_BAUD_OTHER_VAL=115200 1201 | CONFIG_MONITOR_BAUD=115200 1202 | CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y 1203 | # CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set 1204 | CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y 1205 | # CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set 1206 | # CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set 1207 | # CONFIG_CXX_EXCEPTIONS is not set 1208 | CONFIG_STACK_CHECK_NONE=y 1209 | # CONFIG_STACK_CHECK_NORM is not set 1210 | # CONFIG_STACK_CHECK_STRONG is not set 1211 | # CONFIG_STACK_CHECK_ALL is not set 1212 | # CONFIG_WARN_WRITE_STRINGS is not set 1213 | # CONFIG_DISABLE_GCC8_WARNINGS is not set 1214 | # CONFIG_ESP32_APPTRACE_DEST_TRAX is not set 1215 | CONFIG_ESP32_APPTRACE_DEST_NONE=y 1216 | CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y 1217 | CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0 1218 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=0 1219 | CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0 1220 | CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0 1221 | CONFIG_ADC2_DISABLE_DAC=y 1222 | # CONFIG_SPIRAM_SUPPORT is not set 1223 | CONFIG_TRACEMEM_RESERVE_DRAM=0x0 1224 | # CONFIG_ULP_COPROC_ENABLED is not set 1225 | CONFIG_ULP_COPROC_RESERVE_MEM=0 1226 | CONFIG_BROWNOUT_DET=y 1227 | CONFIG_BROWNOUT_DET_LVL_SEL_0=y 1228 | # CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set 1229 | # CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set 1230 | # CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set 1231 | # CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set 1232 | # CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set 1233 | # CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set 1234 | # CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set 1235 | CONFIG_BROWNOUT_DET_LVL=0 1236 | CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y 1237 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set 1238 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set 1239 | # CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set 1240 | # CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set 1241 | # CONFIG_NO_BLOBS is not set 1242 | # CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set 1243 | # CONFIG_EVENT_LOOP_PROFILING is not set 1244 | CONFIG_POST_EVENTS_FROM_ISR=y 1245 | CONFIG_POST_EVENTS_FROM_IRAM_ISR=y 1246 | # CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set 1247 | CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y 1248 | CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 1249 | CONFIG_ESP_SYSTEM_PD_FLASH=y 1250 | CONFIG_REDUCE_PHY_TX_POWER=y 1251 | # CONFIG_ESP32S2_PANIC_PRINT_HALT is not set 1252 | CONFIG_ESP32S2_PANIC_PRINT_REBOOT=y 1253 | # CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set 1254 | # CONFIG_ESP32S2_PANIC_GDBSTUB is not set 1255 | CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 1256 | CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 1257 | CONFIG_MAIN_TASK_STACK_SIZE=7168 1258 | CONFIG_CONSOLE_UART_DEFAULT=y 1259 | # CONFIG_CONSOLE_UART_CUSTOM is not set 1260 | # CONFIG_ESP_CONSOLE_UART_NONE is not set 1261 | CONFIG_CONSOLE_UART=y 1262 | CONFIG_CONSOLE_UART_NUM=0 1263 | CONFIG_CONSOLE_UART_BAUDRATE=115200 1264 | CONFIG_INT_WDT=y 1265 | CONFIG_INT_WDT_TIMEOUT_MS=300 1266 | CONFIG_INT_WDT_CHECK_CPU1=y 1267 | CONFIG_TASK_WDT=y 1268 | # CONFIG_TASK_WDT_PANIC is not set 1269 | CONFIG_TASK_WDT_TIMEOUT_S=5 1270 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 1271 | CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 1272 | CONFIG_IPC_TASK_STACK_SIZE=1024 1273 | CONFIG_TIMER_TASK_STACK_SIZE=3584 1274 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set 1275 | # CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set 1276 | CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y 1277 | CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 1278 | CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 1279 | CONFIG_MB_QUEUE_LENGTH=20 1280 | CONFIG_MB_SERIAL_TASK_STACK_SIZE=4096 1281 | CONFIG_MB_SERIAL_BUF_SIZE=256 1282 | CONFIG_MB_SERIAL_TASK_PRIO=10 1283 | CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=y 1284 | CONFIG_MB_CONTROLLER_SLAVE_ID=0x00112233 1285 | CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 1286 | CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 1287 | CONFIG_MB_CONTROLLER_STACK_SIZE=4096 1288 | CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 1289 | CONFIG_MB_TIMER_PORT_ENABLED=y 1290 | CONFIG_MB_TIMER_GROUP=0 1291 | CONFIG_MB_TIMER_INDEX=0 1292 | # CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set 1293 | CONFIG_TIMER_TASK_PRIORITY=1 1294 | CONFIG_TIMER_TASK_STACK_DEPTH=2048 1295 | CONFIG_TIMER_QUEUE_LENGTH=10 1296 | CONFIG_L2_TO_L3_COPY=y 1297 | # CONFIG_USE_ONLY_LWIP_SELECT is not set 1298 | CONFIG_ESP_GRATUITOUS_ARP=y 1299 | CONFIG_GARP_TMR_INTERVAL=60 1300 | CONFIG_TCPIP_RECVMBOX_SIZE=32 1301 | CONFIG_TCP_MAXRTX=12 1302 | CONFIG_TCP_SYNMAXRTX=12 1303 | CONFIG_TCP_MSS=1440 1304 | CONFIG_TCP_MSL=60000 1305 | CONFIG_TCP_SND_BUF_DEFAULT=5744 1306 | CONFIG_TCP_WND_DEFAULT=5744 1307 | CONFIG_TCP_RECVMBOX_SIZE=6 1308 | CONFIG_TCP_QUEUE_OOSEQ=y 1309 | # CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set 1310 | CONFIG_TCP_OVERSIZE_MSS=y 1311 | # CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set 1312 | # CONFIG_TCP_OVERSIZE_DISABLE is not set 1313 | CONFIG_UDP_RECVMBOX_SIZE=6 1314 | CONFIG_TCPIP_TASK_STACK_SIZE=3072 1315 | CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 1316 | # CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set 1317 | # CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set 1318 | CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF 1319 | # CONFIG_PPP_SUPPORT is not set 1320 | CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 1321 | CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 1322 | CONFIG_ESP32_PTHREAD_STACK_MIN=768 1323 | CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y 1324 | # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set 1325 | # CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set 1326 | CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 1327 | CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" 1328 | CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y 1329 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set 1330 | # CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set 1331 | CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y 1332 | CONFIG_SUPPORT_TERMIOS=y 1333 | CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 1334 | CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 1335 | # End of deprecated options 1336 | -------------------------------------------------------------------------------- /sdkconfig.ci.history: -------------------------------------------------------------------------------- 1 | CONFIG_STORE_HISTORY=y 2 | -------------------------------------------------------------------------------- /sdkconfig.ci.nohistory: -------------------------------------------------------------------------------- 1 | CONFIG_STORE_HISTORY=n 2 | -------------------------------------------------------------------------------- /sdkconfig.defaults: -------------------------------------------------------------------------------- 1 | # Reduce bootloader log verbosity 2 | CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y 3 | CONFIG_BOOTLOADER_LOG_LEVEL=2 4 | 5 | # Increase main task stack size 6 | CONFIG_ESP_MAIN_TASK_STACK_SIZE=7168 7 | 8 | # Enable filesystem 9 | CONFIG_PARTITION_TABLE_CUSTOM=y 10 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_example.csv" 11 | CONFIG_PARTITION_TABLE_FILENAME="partitions_example.csv" 12 | 13 | # Enable FreeRTOS stats formatting functions, needed for 'tasks' command 14 | CONFIG_FREERTOS_USE_TRACE_FACILITY=y 15 | CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y 16 | 17 | # LWIP 18 | CONFIG_LWIP_L2_TO_L3_COPY=y 19 | CONFIG_LWIP_IP_FORWARD=y 20 | CONFIG_LWIP_IPV4_NAPT=y 21 | 22 | CONFIG_ESP32_XTAL_FREQ_40=y 23 | CONFIG_ESP32_XTAL_FREQ_26=n 24 | CONFIG_ESP32_XTAL_FREQ=40 25 | 26 | CONFIG_ESP32_DEFAULT_CPU_FREQ_160=n 27 | CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y 28 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 29 | -------------------------------------------------------------------------------- /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_ARCH_XTENSA=y 7 | CONFIG_IDF_TARGET="esp32" 8 | CONFIG_IDF_TARGET_ESP32=y 9 | CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 10 | 11 | # 12 | # SDK tool configuration 13 | # 14 | CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-" 15 | # CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set 16 | # end of SDK tool configuration 17 | 18 | # 19 | # Build type 20 | # 21 | CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y 22 | # CONFIG_APP_BUILD_TYPE_ELF_RAM is not set 23 | CONFIG_APP_BUILD_GENERATE_BINARIES=y 24 | CONFIG_APP_BUILD_BOOTLOADER=y 25 | CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y 26 | # end of Build type 27 | 28 | # 29 | # Application manager 30 | # 31 | CONFIG_APP_COMPILE_TIME_DATE=y 32 | # CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set 33 | # CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set 34 | # CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set 35 | CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 36 | # end of Application manager 37 | 38 | # 39 | # Bootloader config 40 | # 41 | CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 42 | CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y 43 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set 44 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set 45 | # CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set 46 | # CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set 47 | # CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set 48 | CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y 49 | # CONFIG_BOOTLOADER_LOG_LEVEL_INFO is not set 50 | # CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set 51 | # CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set 52 | CONFIG_BOOTLOADER_LOG_LEVEL=2 53 | # CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set 54 | CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y 55 | # CONFIG_BOOTLOADER_FACTORY_RESET is not set 56 | # CONFIG_BOOTLOADER_APP_TEST is not set 57 | CONFIG_BOOTLOADER_WDT_ENABLE=y 58 | # CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set 59 | CONFIG_BOOTLOADER_WDT_TIME_MS=9000 60 | # CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set 61 | # CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set 62 | CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 63 | # CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set 64 | # end of Bootloader config 65 | 66 | # 67 | # Security features 68 | # 69 | # CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set 70 | # CONFIG_SECURE_BOOT is not set 71 | # CONFIG_SECURE_FLASH_ENC_ENABLED is not set 72 | # end of Security features 73 | 74 | # 75 | # Serial flasher config 76 | # 77 | CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 78 | # CONFIG_ESPTOOLPY_NO_STUB is not set 79 | # CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set 80 | # CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set 81 | CONFIG_ESPTOOLPY_FLASHMODE_DIO=y 82 | # CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set 83 | CONFIG_ESPTOOLPY_FLASHMODE="dio" 84 | # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set 85 | CONFIG_ESPTOOLPY_FLASHFREQ_40M=y 86 | # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set 87 | # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set 88 | CONFIG_ESPTOOLPY_FLASHFREQ="40m" 89 | # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set 90 | # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set 91 | CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y 92 | # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set 93 | # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set 94 | CONFIG_ESPTOOLPY_FLASHSIZE="4MB" 95 | CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y 96 | CONFIG_ESPTOOLPY_BEFORE_RESET=y 97 | # CONFIG_ESPTOOLPY_BEFORE_NORESET is not set 98 | CONFIG_ESPTOOLPY_BEFORE="default_reset" 99 | CONFIG_ESPTOOLPY_AFTER_RESET=y 100 | # CONFIG_ESPTOOLPY_AFTER_NORESET is not set 101 | CONFIG_ESPTOOLPY_AFTER="hard_reset" 102 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set 103 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set 104 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set 105 | CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y 106 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set 107 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set 108 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set 109 | # CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set 110 | CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 111 | CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 112 | # end of Serial flasher config 113 | 114 | # 115 | # Partition Table 116 | # 117 | # CONFIG_PARTITION_TABLE_SINGLE_APP is not set 118 | # CONFIG_PARTITION_TABLE_TWO_OTA is not set 119 | CONFIG_PARTITION_TABLE_CUSTOM=y 120 | CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_example.csv" 121 | CONFIG_PARTITION_TABLE_FILENAME="partitions_example.csv" 122 | CONFIG_PARTITION_TABLE_OFFSET=0x8000 123 | CONFIG_PARTITION_TABLE_MD5=y 124 | # end of Partition Table 125 | 126 | # 127 | # Example Configuration 128 | # 129 | CONFIG_STORE_HISTORY=y 130 | # end of Example Configuration 131 | 132 | # 133 | # Compiler options 134 | # 135 | CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y 136 | # CONFIG_COMPILER_OPTIMIZATION_SIZE is not set 137 | # CONFIG_COMPILER_OPTIMIZATION_PERF is not set 138 | # CONFIG_COMPILER_OPTIMIZATION_NONE is not set 139 | CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y 140 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set 141 | # CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set 142 | # CONFIG_COMPILER_CXX_EXCEPTIONS is not set 143 | # CONFIG_COMPILER_CXX_RTTI is not set 144 | CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y 145 | # CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set 146 | # CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set 147 | # CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set 148 | # CONFIG_COMPILER_WARN_WRITE_STRINGS is not set 149 | # CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set 150 | # CONFIG_COMPILER_DUMP_RTL_FILES 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 | # ESP-ASIO 167 | # 168 | # CONFIG_ASIO_SSL_SUPPORT is not set 169 | # end of ESP-ASIO 170 | 171 | # 172 | # Bluetooth 173 | # 174 | # CONFIG_BT_ENABLED is not set 175 | CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=0 176 | CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0 177 | CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0 178 | CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=0 179 | CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=0 180 | CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0 181 | CONFIG_BTDM_CTRL_PINNED_TO_CORE=0 182 | CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1 183 | CONFIG_BT_RESERVE_DRAM=0 184 | # end of Bluetooth 185 | 186 | # 187 | # CoAP Configuration 188 | # 189 | CONFIG_COAP_MBEDTLS_PSK=y 190 | # CONFIG_COAP_MBEDTLS_PKI is not set 191 | # CONFIG_COAP_MBEDTLS_DEBUG is not set 192 | CONFIG_COAP_LOG_DEFAULT_LEVEL=0 193 | # end of CoAP Configuration 194 | 195 | # 196 | # Driver configurations 197 | # 198 | 199 | # 200 | # ADC configuration 201 | # 202 | # CONFIG_ADC_FORCE_XPD_FSM is not set 203 | CONFIG_ADC_DISABLE_DAC=y 204 | # end of ADC configuration 205 | 206 | # 207 | # SPI configuration 208 | # 209 | # CONFIG_SPI_MASTER_IN_IRAM is not set 210 | CONFIG_SPI_MASTER_ISR_IN_IRAM=y 211 | # CONFIG_SPI_SLAVE_IN_IRAM is not set 212 | CONFIG_SPI_SLAVE_ISR_IN_IRAM=y 213 | # end of SPI configuration 214 | 215 | # 216 | # TWAI configuration 217 | # 218 | # CONFIG_TWAI_ISR_IN_IRAM is not set 219 | # end of TWAI configuration 220 | 221 | # 222 | # UART configuration 223 | # 224 | # CONFIG_UART_ISR_IN_IRAM is not set 225 | # end of UART configuration 226 | 227 | # 228 | # RTCIO configuration 229 | # 230 | # CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set 231 | # end of RTCIO configuration 232 | # end of Driver configurations 233 | 234 | # 235 | # eFuse Bit Manager 236 | # 237 | # CONFIG_EFUSE_CUSTOM_TABLE is not set 238 | # CONFIG_EFUSE_VIRTUAL is not set 239 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set 240 | CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y 241 | # CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set 242 | CONFIG_EFUSE_MAX_BLK_LEN=192 243 | # end of eFuse Bit Manager 244 | 245 | # 246 | # ESP-TLS 247 | # 248 | CONFIG_ESP_TLS_USING_MBEDTLS=y 249 | # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set 250 | # CONFIG_ESP_TLS_SERVER is not set 251 | # CONFIG_ESP_TLS_PSK_VERIFICATION is not set 252 | # end of ESP-TLS 253 | 254 | # 255 | # ESP32-specific 256 | # 257 | CONFIG_ESP32_REV_MIN_0=y 258 | # CONFIG_ESP32_REV_MIN_1 is not set 259 | # CONFIG_ESP32_REV_MIN_2 is not set 260 | # CONFIG_ESP32_REV_MIN_3 is not set 261 | CONFIG_ESP32_REV_MIN=0 262 | CONFIG_ESP32_DPORT_WORKAROUND=y 263 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set 264 | CONFIG_ESP32_DEFAULT_CPU_FREQ_160=y 265 | # CONFIG_ESP32_DEFAULT_CPU_FREQ_240 is not set 266 | CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=160 267 | # CONFIG_ESP32_SPIRAM_SUPPORT is not set 268 | # CONFIG_ESP32_TRAX is not set 269 | CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 270 | # CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set 271 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y 272 | CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 273 | # CONFIG_ESP32_ULP_COPROC_ENABLED is not set 274 | CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0 275 | CONFIG_ESP32_DEBUG_OCDAWARE=y 276 | CONFIG_ESP32_BROWNOUT_DET=y 277 | CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y 278 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set 279 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set 280 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set 281 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set 282 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set 283 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set 284 | # CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set 285 | CONFIG_ESP32_BROWNOUT_DET_LVL=0 286 | CONFIG_ESP32_REDUCE_PHY_TX_POWER=y 287 | CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y 288 | # CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set 289 | # CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set 290 | # CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set 291 | CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y 292 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set 293 | # CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set 294 | # CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set 295 | CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 296 | CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 297 | CONFIG_ESP32_XTAL_FREQ_40=y 298 | # CONFIG_ESP32_XTAL_FREQ_26 is not set 299 | # CONFIG_ESP32_XTAL_FREQ_AUTO is not set 300 | CONFIG_ESP32_XTAL_FREQ=40 301 | # CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set 302 | # CONFIG_ESP32_NO_BLOBS is not set 303 | # CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set 304 | # CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set 305 | CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 306 | # end of ESP32-specific 307 | 308 | # 309 | # ADC-Calibration 310 | # 311 | CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y 312 | CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y 313 | CONFIG_ADC_CAL_LUT_ENABLE=y 314 | # end of ADC-Calibration 315 | 316 | # 317 | # Common ESP-related 318 | # 319 | CONFIG_ESP_ERR_TO_NAME_LOOKUP=y 320 | CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 321 | CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 322 | CONFIG_ESP_MAIN_TASK_STACK_SIZE=7168 323 | CONFIG_ESP_IPC_TASK_STACK_SIZE=1024 324 | CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y 325 | CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 326 | CONFIG_ESP_CONSOLE_UART_DEFAULT=y 327 | # CONFIG_ESP_CONSOLE_UART_CUSTOM is not set 328 | # CONFIG_ESP_CONSOLE_NONE is not set 329 | CONFIG_ESP_CONSOLE_UART=y 330 | CONFIG_ESP_CONSOLE_MULTIPLE_UART=y 331 | CONFIG_ESP_CONSOLE_UART_NUM=0 332 | CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 333 | CONFIG_ESP_INT_WDT=y 334 | CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 335 | CONFIG_ESP_INT_WDT_CHECK_CPU1=y 336 | CONFIG_ESP_TASK_WDT=y 337 | # CONFIG_ESP_TASK_WDT_PANIC is not set 338 | CONFIG_ESP_TASK_WDT_TIMEOUT_S=5 339 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y 340 | CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y 341 | # CONFIG_ESP_PANIC_HANDLER_IRAM is not set 342 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y 343 | CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y 344 | CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y 345 | CONFIG_ESP_MAC_ADDR_UNIVERSE_BT_OFFSET=2 346 | CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y 347 | # end of Common ESP-related 348 | 349 | # 350 | # Ethernet 351 | # 352 | CONFIG_ETH_ENABLED=y 353 | CONFIG_ETH_USE_ESP32_EMAC=y 354 | CONFIG_ETH_PHY_INTERFACE_RMII=y 355 | # CONFIG_ETH_PHY_INTERFACE_MII is not set 356 | CONFIG_ETH_RMII_CLK_INPUT=y 357 | # CONFIG_ETH_RMII_CLK_OUTPUT is not set 358 | CONFIG_ETH_RMII_CLK_IN_GPIO=0 359 | CONFIG_ETH_DMA_BUFFER_SIZE=512 360 | CONFIG_ETH_DMA_RX_BUFFER_NUM=10 361 | CONFIG_ETH_DMA_TX_BUFFER_NUM=10 362 | CONFIG_ETH_USE_SPI_ETHERNET=y 363 | CONFIG_ETH_SPI_ETHERNET_DM9051=y 364 | # CONFIG_ETH_SPI_ETHERNET_W5500 is not set 365 | # CONFIG_ETH_USE_OPENETH is not set 366 | # end of Ethernet 367 | 368 | # 369 | # Event Loop Library 370 | # 371 | # CONFIG_ESP_EVENT_LOOP_PROFILING is not set 372 | CONFIG_ESP_EVENT_POST_FROM_ISR=y 373 | CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y 374 | # end of Event Loop Library 375 | 376 | # 377 | # GDB Stub 378 | # 379 | # end of GDB Stub 380 | 381 | # 382 | # ESP HTTP client 383 | # 384 | CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y 385 | # CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set 386 | # end of ESP HTTP client 387 | 388 | # 389 | # HTTP Server 390 | # 391 | CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 392 | CONFIG_HTTPD_MAX_URI_LEN=512 393 | CONFIG_HTTPD_ERR_RESP_NO_DELAY=y 394 | CONFIG_HTTPD_PURGE_BUF_LEN=32 395 | # CONFIG_HTTPD_LOG_PURGE_DATA is not set 396 | # CONFIG_HTTPD_WS_SUPPORT is not set 397 | # end of HTTP Server 398 | 399 | # 400 | # ESP HTTPS OTA 401 | # 402 | # CONFIG_OTA_ALLOW_HTTP is not set 403 | # end of ESP HTTPS OTA 404 | 405 | # 406 | # ESP HTTPS server 407 | # 408 | # CONFIG_ESP_HTTPS_SERVER_ENABLE is not set 409 | # end of ESP HTTPS server 410 | 411 | # 412 | # ESP NETIF Adapter 413 | # 414 | CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 415 | CONFIG_ESP_NETIF_TCPIP_LWIP=y 416 | # CONFIG_ESP_NETIF_LOOPBACK is not set 417 | CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER=y 418 | # end of ESP NETIF Adapter 419 | 420 | # 421 | # Power Management 422 | # 423 | # CONFIG_PM_ENABLE is not set 424 | # end of Power Management 425 | 426 | # 427 | # ESP System Settings 428 | # 429 | # CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set 430 | CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT=y 431 | # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set 432 | # CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set 433 | # end of ESP System Settings 434 | 435 | # 436 | # High resolution timer (esp_timer) 437 | # 438 | # CONFIG_ESP_TIMER_PROFILING is not set 439 | CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y 440 | CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y 441 | CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 442 | # CONFIG_ESP_TIMER_IMPL_FRC2 is not set 443 | CONFIG_ESP_TIMER_IMPL_TG0_LAC=y 444 | # end of High resolution timer (esp_timer) 445 | 446 | # 447 | # Wi-Fi 448 | # 449 | CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 450 | CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 451 | # CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set 452 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y 453 | CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 454 | CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32 455 | # CONFIG_ESP32_WIFI_CSI_ENABLED is not set 456 | CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y 457 | CONFIG_ESP32_WIFI_TX_BA_WIN=6 458 | CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y 459 | CONFIG_ESP32_WIFI_RX_BA_WIN=6 460 | CONFIG_ESP32_WIFI_NVS_ENABLED=y 461 | CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y 462 | # CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set 463 | CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 464 | CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 465 | # CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE is not set 466 | CONFIG_ESP32_WIFI_IRAM_OPT=y 467 | CONFIG_ESP32_WIFI_RX_IRAM_OPT=y 468 | # CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set 469 | # end of Wi-Fi 470 | 471 | # 472 | # PHY 473 | # 474 | CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y 475 | # CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set 476 | CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 477 | CONFIG_ESP32_PHY_MAX_TX_POWER=20 478 | # end of PHY 479 | 480 | # 481 | # Core dump 482 | # 483 | # CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set 484 | # CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set 485 | CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y 486 | # end of Core dump 487 | 488 | # 489 | # FAT Filesystem support 490 | # 491 | # CONFIG_FATFS_CODEPAGE_DYNAMIC is not set 492 | CONFIG_FATFS_CODEPAGE_437=y 493 | # CONFIG_FATFS_CODEPAGE_720 is not set 494 | # CONFIG_FATFS_CODEPAGE_737 is not set 495 | # CONFIG_FATFS_CODEPAGE_771 is not set 496 | # CONFIG_FATFS_CODEPAGE_775 is not set 497 | # CONFIG_FATFS_CODEPAGE_850 is not set 498 | # CONFIG_FATFS_CODEPAGE_852 is not set 499 | # CONFIG_FATFS_CODEPAGE_855 is not set 500 | # CONFIG_FATFS_CODEPAGE_857 is not set 501 | # CONFIG_FATFS_CODEPAGE_860 is not set 502 | # CONFIG_FATFS_CODEPAGE_861 is not set 503 | # CONFIG_FATFS_CODEPAGE_862 is not set 504 | # CONFIG_FATFS_CODEPAGE_863 is not set 505 | # CONFIG_FATFS_CODEPAGE_864 is not set 506 | # CONFIG_FATFS_CODEPAGE_865 is not set 507 | # CONFIG_FATFS_CODEPAGE_866 is not set 508 | # CONFIG_FATFS_CODEPAGE_869 is not set 509 | # CONFIG_FATFS_CODEPAGE_932 is not set 510 | # CONFIG_FATFS_CODEPAGE_936 is not set 511 | # CONFIG_FATFS_CODEPAGE_949 is not set 512 | # CONFIG_FATFS_CODEPAGE_950 is not set 513 | CONFIG_FATFS_CODEPAGE=437 514 | CONFIG_FATFS_LFN_NONE=y 515 | # CONFIG_FATFS_LFN_HEAP is not set 516 | # CONFIG_FATFS_LFN_STACK is not set 517 | CONFIG_FATFS_FS_LOCK=0 518 | CONFIG_FATFS_TIMEOUT_MS=10000 519 | CONFIG_FATFS_PER_FILE_CACHE=y 520 | # CONFIG_FATFS_USE_FASTSEEK is not set 521 | # end of FAT Filesystem support 522 | 523 | # 524 | # Modbus configuration 525 | # 526 | CONFIG_FMB_COMM_MODE_TCP_EN=y 527 | CONFIG_FMB_TCP_PORT_DEFAULT=502 528 | CONFIG_FMB_TCP_PORT_MAX_CONN=5 529 | CONFIG_FMB_TCP_CONNECTION_TOUT_SEC=20 530 | CONFIG_FMB_COMM_MODE_RTU_EN=y 531 | CONFIG_FMB_COMM_MODE_ASCII_EN=y 532 | CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 533 | CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 534 | CONFIG_FMB_QUEUE_LENGTH=20 535 | CONFIG_FMB_PORT_TASK_STACK_SIZE=4096 536 | CONFIG_FMB_SERIAL_BUF_SIZE=256 537 | CONFIG_FMB_SERIAL_ASCII_BITS_PER_SYMB=8 538 | CONFIG_FMB_SERIAL_ASCII_TIMEOUT_RESPOND_MS=1000 539 | CONFIG_FMB_PORT_TASK_PRIO=10 540 | # CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set 541 | CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 542 | CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 543 | CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 544 | CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 545 | CONFIG_FMB_TIMER_PORT_ENABLED=y 546 | CONFIG_FMB_TIMER_GROUP=0 547 | CONFIG_FMB_TIMER_INDEX=0 548 | # CONFIG_FMB_TIMER_ISR_IN_IRAM is not set 549 | # end of Modbus configuration 550 | 551 | # 552 | # FreeRTOS 553 | # 554 | # CONFIG_FREERTOS_UNICORE is not set 555 | CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF 556 | CONFIG_FREERTOS_CORETIMER_0=y 557 | # CONFIG_FREERTOS_CORETIMER_1 is not set 558 | CONFIG_FREERTOS_HZ=100 559 | CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y 560 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set 561 | # CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set 562 | CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y 563 | # CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set 564 | CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y 565 | CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 566 | CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y 567 | # CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set 568 | # CONFIG_FREERTOS_ASSERT_DISABLE is not set 569 | CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 570 | CONFIG_FREERTOS_ISR_STACKSIZE=1536 571 | # CONFIG_FREERTOS_LEGACY_HOOKS is not set 572 | CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 573 | CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y 574 | # CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set 575 | CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 576 | CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 577 | CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 578 | CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 579 | CONFIG_FREERTOS_USE_TRACE_FACILITY=y 580 | CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y 581 | # CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID is not set 582 | # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set 583 | CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y 584 | CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y 585 | # CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set 586 | # CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set 587 | CONFIG_FREERTOS_DEBUG_OCDAWARE=y 588 | # CONFIG_FREERTOS_FPU_IN_ISR is not set 589 | # end of FreeRTOS 590 | 591 | # 592 | # Heap memory debugging 593 | # 594 | CONFIG_HEAP_POISONING_DISABLED=y 595 | # CONFIG_HEAP_POISONING_LIGHT is not set 596 | # CONFIG_HEAP_POISONING_COMPREHENSIVE is not set 597 | CONFIG_HEAP_TRACING_OFF=y 598 | # CONFIG_HEAP_TRACING_STANDALONE is not set 599 | # CONFIG_HEAP_TRACING_TOHOST is not set 600 | # CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set 601 | # end of Heap memory debugging 602 | 603 | # 604 | # jsmn 605 | # 606 | # CONFIG_JSMN_PARENT_LINKS is not set 607 | # CONFIG_JSMN_STRICT is not set 608 | # end of jsmn 609 | 610 | # 611 | # libsodium 612 | # 613 | # end of libsodium 614 | 615 | # 616 | # Log output 617 | # 618 | # CONFIG_LOG_DEFAULT_LEVEL_NONE is not set 619 | # CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set 620 | # CONFIG_LOG_DEFAULT_LEVEL_WARN is not set 621 | CONFIG_LOG_DEFAULT_LEVEL_INFO=y 622 | # CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set 623 | # CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set 624 | CONFIG_LOG_DEFAULT_LEVEL=3 625 | CONFIG_LOG_COLORS=y 626 | CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y 627 | # CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set 628 | # end of Log output 629 | 630 | # 631 | # LWIP 632 | # 633 | CONFIG_LWIP_LOCAL_HOSTNAME="espressif" 634 | CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y 635 | CONFIG_LWIP_L2_TO_L3_COPY=y 636 | # CONFIG_LWIP_IRAM_OPTIMIZATION is not set 637 | CONFIG_LWIP_TIMERS_ONDEMAND=y 638 | CONFIG_LWIP_MAX_SOCKETS=10 639 | # CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set 640 | # CONFIG_LWIP_SO_LINGER is not set 641 | CONFIG_LWIP_SO_REUSE=y 642 | CONFIG_LWIP_SO_REUSE_RXTOALL=y 643 | # CONFIG_LWIP_SO_RCVBUF is not set 644 | # CONFIG_LWIP_NETBUF_RECVINFO is not set 645 | CONFIG_LWIP_IP4_FRAG=y 646 | CONFIG_LWIP_IP6_FRAG=y 647 | # CONFIG_LWIP_IP4_REASSEMBLY is not set 648 | # CONFIG_LWIP_IP6_REASSEMBLY is not set 649 | CONFIG_LWIP_IP_FORWARD=y 650 | CONFIG_LWIP_IPV4_NAPT=y 651 | # CONFIG_LWIP_STATS is not set 652 | # CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set 653 | CONFIG_LWIP_ESP_GRATUITOUS_ARP=y 654 | CONFIG_LWIP_GARP_TMR_INTERVAL=60 655 | CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 656 | CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y 657 | # CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set 658 | 659 | # 660 | # DHCP server 661 | # 662 | CONFIG_LWIP_DHCPS_LEASE_UNIT=60 663 | CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 664 | # end of DHCP server 665 | 666 | # CONFIG_LWIP_AUTOIP is not set 667 | # CONFIG_LWIP_IPV6_AUTOCONFIG is not set 668 | CONFIG_LWIP_NETIF_LOOPBACK=y 669 | CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 670 | 671 | # 672 | # TCP 673 | # 674 | CONFIG_LWIP_MAX_ACTIVE_TCP=16 675 | CONFIG_LWIP_MAX_LISTENING_TCP=16 676 | CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y 677 | CONFIG_LWIP_TCP_MAXRTX=12 678 | CONFIG_LWIP_TCP_SYNMAXRTX=6 679 | CONFIG_LWIP_TCP_MSS=1440 680 | CONFIG_LWIP_TCP_TMR_INTERVAL=250 681 | CONFIG_LWIP_TCP_MSL=60000 682 | CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744 683 | CONFIG_LWIP_TCP_WND_DEFAULT=5744 684 | CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 685 | CONFIG_LWIP_TCP_QUEUE_OOSEQ=y 686 | # CONFIG_LWIP_TCP_SACK_OUT is not set 687 | # CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set 688 | CONFIG_LWIP_TCP_OVERSIZE_MSS=y 689 | # CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set 690 | # CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set 691 | CONFIG_LWIP_TCP_RTO_TIME=3000 692 | # end of TCP 693 | 694 | # 695 | # UDP 696 | # 697 | CONFIG_LWIP_MAX_UDP_PCBS=16 698 | CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 699 | # end of UDP 700 | 701 | # 702 | # Checksums 703 | # 704 | # CONFIG_LWIP_CHECKSUM_CHECK_IP is not set 705 | # CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set 706 | CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y 707 | # end of Checksums 708 | 709 | CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 710 | CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y 711 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set 712 | # CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set 713 | CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF 714 | # CONFIG_LWIP_PPP_SUPPORT is not set 715 | CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 716 | CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 717 | # CONFIG_LWIP_SLIP_SUPPORT is not set 718 | 719 | # 720 | # ICMP 721 | # 722 | # CONFIG_LWIP_MULTICAST_PING is not set 723 | # CONFIG_LWIP_BROADCAST_PING is not set 724 | # end of ICMP 725 | 726 | # 727 | # LWIP RAW API 728 | # 729 | CONFIG_LWIP_MAX_RAW_PCBS=16 730 | # end of LWIP RAW API 731 | 732 | # 733 | # SNTP 734 | # 735 | CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 736 | CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 737 | # end of SNTP 738 | 739 | CONFIG_LWIP_ESP_LWIP_ASSERT=y 740 | 741 | # 742 | # Hooks 743 | # 744 | # CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set 745 | CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y 746 | # CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set 747 | CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y 748 | # CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set 749 | # CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set 750 | CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y 751 | # CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set 752 | # CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set 753 | # end of Hooks 754 | 755 | # 756 | # Debug 757 | # 758 | # CONFIG_LWIP_NETIF_DEBUG is not set 759 | # CONFIG_LWIP_PBUF_DEBUG is not set 760 | # CONFIG_LWIP_ETHARP_DEBUG is not set 761 | # CONFIG_LWIP_API_LIB_DEBUG is not set 762 | # CONFIG_LWIP_SOCKETS_DEBUG is not set 763 | # CONFIG_LWIP_IP_DEBUG is not set 764 | # CONFIG_LWIP_ICMP_DEBUG is not set 765 | # CONFIG_LWIP_DHCP_DEBUG is not set 766 | # CONFIG_LWIP_IP6_DEBUG is not set 767 | # CONFIG_LWIP_ICMP6_DEBUG is not set 768 | # CONFIG_LWIP_TCP_DEBUG is not set 769 | # end of Debug 770 | # end of LWIP 771 | 772 | # 773 | # mbedTLS 774 | # 775 | CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y 776 | # CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set 777 | # CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set 778 | CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y 779 | CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 780 | CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 781 | # CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set 782 | # CONFIG_MBEDTLS_DEBUG is not set 783 | 784 | # 785 | # Certificate Bundle 786 | # 787 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y 788 | CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=y 789 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set 790 | # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE is not set 791 | # CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE is not set 792 | # end of Certificate Bundle 793 | 794 | # CONFIG_MBEDTLS_ECP_RESTARTABLE is not set 795 | # CONFIG_MBEDTLS_CMAC_C is not set 796 | CONFIG_MBEDTLS_HARDWARE_AES=y 797 | CONFIG_MBEDTLS_HARDWARE_MPI=y 798 | CONFIG_MBEDTLS_HARDWARE_SHA=y 799 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set 800 | # CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set 801 | CONFIG_MBEDTLS_HAVE_TIME=y 802 | # CONFIG_MBEDTLS_HAVE_TIME_DATE is not set 803 | CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y 804 | CONFIG_MBEDTLS_SHA512_C=y 805 | CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y 806 | # CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set 807 | # CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set 808 | # CONFIG_MBEDTLS_TLS_DISABLED is not set 809 | CONFIG_MBEDTLS_TLS_SERVER=y 810 | CONFIG_MBEDTLS_TLS_CLIENT=y 811 | CONFIG_MBEDTLS_TLS_ENABLED=y 812 | 813 | # 814 | # TLS Key Exchange Methods 815 | # 816 | CONFIG_MBEDTLS_PSK_MODES=y 817 | CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y 818 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y 819 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y 820 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y 821 | CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y 822 | CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y 823 | CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y 824 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y 825 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y 826 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y 827 | CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y 828 | # end of TLS Key Exchange Methods 829 | 830 | CONFIG_MBEDTLS_SSL_RENEGOTIATION=y 831 | # CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set 832 | CONFIG_MBEDTLS_SSL_PROTO_TLS1=y 833 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y 834 | CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y 835 | CONFIG_MBEDTLS_SSL_PROTO_DTLS=y 836 | CONFIG_MBEDTLS_SSL_ALPN=y 837 | CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y 838 | CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y 839 | 840 | # 841 | # Symmetric Ciphers 842 | # 843 | CONFIG_MBEDTLS_AES_C=y 844 | # CONFIG_MBEDTLS_CAMELLIA_C is not set 845 | # CONFIG_MBEDTLS_DES_C is not set 846 | CONFIG_MBEDTLS_RC4_DISABLED=y 847 | # CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set 848 | # CONFIG_MBEDTLS_RC4_ENABLED is not set 849 | # CONFIG_MBEDTLS_BLOWFISH_C is not set 850 | # CONFIG_MBEDTLS_XTEA_C is not set 851 | CONFIG_MBEDTLS_CCM_C=y 852 | CONFIG_MBEDTLS_GCM_C=y 853 | # end of Symmetric Ciphers 854 | 855 | # CONFIG_MBEDTLS_RIPEMD160_C is not set 856 | 857 | # 858 | # Certificates 859 | # 860 | CONFIG_MBEDTLS_PEM_PARSE_C=y 861 | CONFIG_MBEDTLS_PEM_WRITE_C=y 862 | CONFIG_MBEDTLS_X509_CRL_PARSE_C=y 863 | CONFIG_MBEDTLS_X509_CSR_PARSE_C=y 864 | # end of Certificates 865 | 866 | CONFIG_MBEDTLS_ECP_C=y 867 | CONFIG_MBEDTLS_ECDH_C=y 868 | CONFIG_MBEDTLS_ECDSA_C=y 869 | # CONFIG_MBEDTLS_ECJPAKE_C is not set 870 | CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y 871 | CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y 872 | CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y 873 | CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y 874 | CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y 875 | CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y 876 | CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y 877 | CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y 878 | CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y 879 | CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y 880 | CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y 881 | CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y 882 | CONFIG_MBEDTLS_ECP_NIST_OPTIM=y 883 | # CONFIG_MBEDTLS_POLY1305_C is not set 884 | # CONFIG_MBEDTLS_CHACHA20_C is not set 885 | # CONFIG_MBEDTLS_HKDF_C is not set 886 | # CONFIG_MBEDTLS_THREADING_C is not set 887 | # CONFIG_MBEDTLS_SECURITY_RISKS is not set 888 | # end of mbedTLS 889 | 890 | # 891 | # mDNS 892 | # 893 | CONFIG_MDNS_MAX_SERVICES=10 894 | CONFIG_MDNS_TASK_PRIORITY=1 895 | CONFIG_MDNS_TASK_STACK_SIZE=4096 896 | # CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set 897 | CONFIG_MDNS_TASK_AFFINITY_CPU0=y 898 | # CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set 899 | CONFIG_MDNS_TASK_AFFINITY=0x0 900 | CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 901 | CONFIG_MDNS_TIMER_PERIOD_MS=100 902 | # end of mDNS 903 | 904 | # 905 | # ESP-MQTT Configurations 906 | # 907 | CONFIG_MQTT_PROTOCOL_311=y 908 | CONFIG_MQTT_TRANSPORT_SSL=y 909 | CONFIG_MQTT_TRANSPORT_WEBSOCKET=y 910 | CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y 911 | # CONFIG_MQTT_USE_CUSTOM_CONFIG is not set 912 | # CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set 913 | # CONFIG_MQTT_CUSTOM_OUTBOX is not set 914 | # end of ESP-MQTT Configurations 915 | 916 | # 917 | # Newlib 918 | # 919 | CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y 920 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set 921 | # CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set 922 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set 923 | # CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set 924 | CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y 925 | # CONFIG_NEWLIB_NANO_FORMAT is not set 926 | # end of Newlib 927 | 928 | # 929 | # NVS 930 | # 931 | # end of NVS 932 | 933 | # 934 | # OpenSSL 935 | # 936 | # CONFIG_OPENSSL_DEBUG is not set 937 | CONFIG_OPENSSL_ERROR_STACK=y 938 | # CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set 939 | CONFIG_OPENSSL_ASSERT_EXIT=y 940 | # end of OpenSSL 941 | 942 | # 943 | # PThreads 944 | # 945 | CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 946 | CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 947 | CONFIG_PTHREAD_STACK_MIN=768 948 | CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y 949 | # CONFIG_PTHREAD_DEFAULT_CORE_0 is not set 950 | # CONFIG_PTHREAD_DEFAULT_CORE_1 is not set 951 | CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 952 | CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" 953 | # end of PThreads 954 | 955 | # 956 | # SPI Flash driver 957 | # 958 | # CONFIG_SPI_FLASH_VERIFY_WRITE is not set 959 | # CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set 960 | CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y 961 | CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y 962 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set 963 | # CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set 964 | # CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set 965 | # CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set 966 | # CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set 967 | CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y 968 | CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20 969 | CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1 970 | CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192 971 | # CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set 972 | # CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set 973 | 974 | # 975 | # Auto-detect flash chips 976 | # 977 | CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y 978 | CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y 979 | CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y 980 | CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y 981 | # end of Auto-detect flash chips 982 | # end of SPI Flash driver 983 | 984 | # 985 | # SPIFFS Configuration 986 | # 987 | CONFIG_SPIFFS_MAX_PARTITIONS=3 988 | 989 | # 990 | # SPIFFS Cache Configuration 991 | # 992 | CONFIG_SPIFFS_CACHE=y 993 | CONFIG_SPIFFS_CACHE_WR=y 994 | # CONFIG_SPIFFS_CACHE_STATS is not set 995 | # end of SPIFFS Cache Configuration 996 | 997 | CONFIG_SPIFFS_PAGE_CHECK=y 998 | CONFIG_SPIFFS_GC_MAX_RUNS=10 999 | # CONFIG_SPIFFS_GC_STATS is not set 1000 | CONFIG_SPIFFS_PAGE_SIZE=256 1001 | CONFIG_SPIFFS_OBJ_NAME_LEN=32 1002 | # CONFIG_SPIFFS_FOLLOW_SYMLINKS is not set 1003 | CONFIG_SPIFFS_USE_MAGIC=y 1004 | CONFIG_SPIFFS_USE_MAGIC_LENGTH=y 1005 | CONFIG_SPIFFS_META_LENGTH=4 1006 | CONFIG_SPIFFS_USE_MTIME=y 1007 | 1008 | # 1009 | # Debug Configuration 1010 | # 1011 | # CONFIG_SPIFFS_DBG is not set 1012 | # CONFIG_SPIFFS_API_DBG is not set 1013 | # CONFIG_SPIFFS_GC_DBG is not set 1014 | # CONFIG_SPIFFS_CACHE_DBG is not set 1015 | # CONFIG_SPIFFS_CHECK_DBG is not set 1016 | # CONFIG_SPIFFS_TEST_VISUALISATION is not set 1017 | # end of Debug Configuration 1018 | # end of SPIFFS Configuration 1019 | 1020 | # 1021 | # TCP Transport 1022 | # 1023 | CONFIG_WS_BUFFER_SIZE=1024 1024 | # end of TCP Transport 1025 | 1026 | # 1027 | # TinyUSB 1028 | # 1029 | # end of TinyUSB 1030 | 1031 | # 1032 | # Unity unit testing library 1033 | # 1034 | CONFIG_UNITY_ENABLE_FLOAT=y 1035 | CONFIG_UNITY_ENABLE_DOUBLE=y 1036 | # CONFIG_UNITY_ENABLE_COLOR is not set 1037 | CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y 1038 | # CONFIG_UNITY_ENABLE_FIXTURE is not set 1039 | # CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set 1040 | # end of Unity unit testing library 1041 | 1042 | # 1043 | # Virtual file system 1044 | # 1045 | CONFIG_VFS_SUPPORT_IO=y 1046 | CONFIG_VFS_SUPPORT_DIR=y 1047 | CONFIG_VFS_SUPPORT_SELECT=y 1048 | CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y 1049 | CONFIG_VFS_SUPPORT_TERMIOS=y 1050 | 1051 | # 1052 | # Host File System I/O (Semihosting) 1053 | # 1054 | CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 1055 | CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 1056 | # end of Host File System I/O (Semihosting) 1057 | # end of Virtual file system 1058 | 1059 | # 1060 | # Wear Levelling 1061 | # 1062 | # CONFIG_WL_SECTOR_SIZE_512 is not set 1063 | CONFIG_WL_SECTOR_SIZE_4096=y 1064 | CONFIG_WL_SECTOR_SIZE=4096 1065 | # end of Wear Levelling 1066 | 1067 | # 1068 | # Wi-Fi Provisioning Manager 1069 | # 1070 | CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 1071 | CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 1072 | # end of Wi-Fi Provisioning Manager 1073 | 1074 | # 1075 | # Supplicant 1076 | # 1077 | CONFIG_WPA_MBEDTLS_CRYPTO=y 1078 | # CONFIG_WPA_DEBUG_PRINT is not set 1079 | # CONFIG_WPA_TESTING_OPTIONS is not set 1080 | # CONFIG_WPA_WPS_WARS is not set 1081 | # CONFIG_WPA_11KV_SUPPORT is not set 1082 | # end of Supplicant 1083 | # end of Component config 1084 | 1085 | # 1086 | # Compatibility options 1087 | # 1088 | # CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set 1089 | # end of Compatibility options 1090 | --------------------------------------------------------------------------------