From a444c6cd1e242b90280a03b8f13dd70dd94d5b7c Mon Sep 17 00:00:00 2001 From: ElectroNick Date: Sun, 7 May 2023 11:00:42 -0500 Subject: [PATCH] Working code. Continue the fine tuning with the webserver to expose all functionalities. --- components/nvsfuncs/nvs_funcs.c | 4 +- main/server.c | 270 ++++++++++++++++++++------------ sdkconfig | 21 ++- sdkconfig.old | 21 ++- 4 files changed, 191 insertions(+), 125 deletions(-) diff --git a/components/nvsfuncs/nvs_funcs.c b/components/nvsfuncs/nvs_funcs.c index bcab4c56..35f7e0e2 100644 --- a/components/nvsfuncs/nvs_funcs.c +++ b/components/nvsfuncs/nvs_funcs.c @@ -359,7 +359,7 @@ esp_err_t nvs_delete_layer(uint8_t delete_layer_num) error = nvs_open(LAYER_NAMESPACE, NVS_READWRITE, &nvs_handle); if (error == ESP_OK) { - ESP_LOGE(TAG, "LAYER_NAMESPACE open ---OK"); + ESP_LOGI(TAG, "LAYER_NAMESPACE open ---OK"); } else { @@ -369,7 +369,7 @@ esp_err_t nvs_delete_layer(uint8_t delete_layer_num) error = nvs_get_u8(nvs_handle, LAYER_NUM_KEY, &layer_num); if (error == ESP_OK) { - ESP_LOGE(TAG, "LAYER KEY FOUND ---OK"); + ESP_LOGI(TAG, "LAYER KEY FOUND ---OK"); } else { diff --git a/main/server.c b/main/server.c index 3871e550..8636ac7d 100644 --- a/main/server.c +++ b/main/server.c @@ -272,20 +272,13 @@ esp_err_t get_layer_url_handler(httpd_req_t *req) { ESP_LOGI(TAG, "HTTP GET LAYER INFO --> /api/layers"); - ESP_ERROR_CHECK(httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*")); // - // httpd_resp_set_hdr(req, "Access-Control-Allow-Methods", "*"); + ESP_ERROR_CHECK(httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*")); httpd_resp_set_hdr(req, "Access-Control-Allow-Headers", "Content-Type"); - // httpd_resp_set_hdr(req, "Access-Control-Allow-Credentials", "true"); - // httpd_resp_set_hdr(req, "Access-Control-Max-Age", "3600"); - // httpd_resp_set_hdr(req, "Access-Control-Expose-Headers", "X-Custom-Header"); - // httpd_resp_set_hdr(req, "Vary", "Origin"); // Read the URI line and get the host char *buf; size_t buf_len; - - char str_param[SHORT_UUID_STR_LEN]; - char int_param[3]; + char uuid_param[SHORT_UUID_STR_LEN]; int position = 0; // Read the URI line and get the parameters @@ -297,30 +290,48 @@ esp_err_t get_layer_url_handler(httpd_req_t *req) { ESP_LOGI(TAG, "Found URL query: %s", buf); - if (httpd_query_key_value(buf, "uuid", str_param, sizeof(str_param)) == ESP_OK) + if (httpd_query_key_value(buf, "uuid", uuid_param, sizeof(uuid_param)) == ESP_OK) { - ESP_LOGI(TAG, "The string value = %s", str_param); + ESP_LOGI(TAG, "The string value = %s", uuid_param); } - if (httpd_query_key_value(buf, "pos", int_param, sizeof(int_param)) == ESP_OK) + else { - ESP_LOGI(TAG, "The int value = %s", int_param); - position = atoi(int_param); + ESP_LOGE(TAG, "There is no uuid parameter in the query"); + httpd_resp_set_status(req, HTTPD_400); + httpd_resp_send(req, NULL, 0); + return ESP_OK; } } free(buf); } - - if (strcmp(key_layouts[position].uuid_str, str_param) != 0) + else { + ESP_LOGE(TAG, "There is no uuid parameter in the query"); - ESP_LOGI(TAG, "key layout uuid %s", key_layouts[position].uuid_str); - ESP_LOGI(TAG, "The string value = %s", str_param); + httpd_resp_set_status(req, HTTPD_400); + httpd_resp_send(req, NULL, 0); + return ESP_OK; + } + int found_flag = 0; + int pos = 0; + for(pos=0; pos < layers_num; pos++) + { + if( strcmp(key_layouts[pos].uuid_str, uuid_param) ==0 ) //If both are equal + { + found_flag = 1; //activate found flag + break; //Get off the for loop + } + } + if(!found_flag) //IF not found, return http error + { + ESP_LOGE(TAG, "UUID not found"); httpd_resp_set_status(req, HTTPD_400); httpd_resp_send(req, NULL, 0); return ESP_OK; } + char *string = NULL; cJSON *encoder_item = NULL; cJSON *gesture_item = NULL; @@ -338,11 +349,11 @@ esp_err_t get_layer_url_handler(httpd_req_t *req) return ESP_OK; } - cJSON *_name = cJSON_CreateString(key_layouts[position].name); + cJSON *_name = cJSON_CreateString(key_layouts[pos].name); cJSON_AddItemToObject(layer_object, "name", _name); // is_active = cJSON_CreateBool(key_layouts[index]->active); - is_active = cJSON_CreateBool(key_layouts[position].active); + is_active = cJSON_CreateBool(key_layouts[pos].active); if (is_active == NULL) { cJSON_Delete(layer_object); @@ -368,8 +379,8 @@ esp_err_t get_layer_url_handler(httpd_req_t *req) for (index_col = 0; index_col < MATRIX_COLS; index_col++) { cJSON *key = cJSON_CreateObject(); - cJSON_AddStringToObject(key, "name", key_layouts[position].key_map_names[index][index_col]); - cJSON_AddNumberToObject(key, "key_code", key_layouts[position].key_map[index][index_col]); + cJSON_AddStringToObject(key, "name", key_layouts[pos].key_map_names[index][index_col]); + cJSON_AddNumberToObject(key, "key_code", key_layouts[pos].key_map[index][index_col]); cJSON_AddItemToArray(row, key); } } @@ -379,7 +390,7 @@ esp_err_t get_layer_url_handler(httpd_req_t *req) for (index = 0; index < ENCODER_SIZE; index++) { - encoder_item = cJSON_CreateNumber(key_layouts[position].left_encoder_map[index]); + encoder_item = cJSON_CreateNumber(key_layouts[pos].left_encoder_map[index]); if (encoder_item == NULL) { cJSON_Delete(layer_object); @@ -395,7 +406,7 @@ esp_err_t get_layer_url_handler(httpd_req_t *req) for (index = 0; index < ENCODER_SIZE; index++) { - encoder_item = cJSON_CreateNumber(key_layouts[position].right_encoder_map[index]); + encoder_item = cJSON_CreateNumber(key_layouts[pos].right_encoder_map[index]); if (encoder_item == NULL) { cJSON_Delete(layer_object); @@ -411,7 +422,7 @@ esp_err_t get_layer_url_handler(httpd_req_t *req) for (index = 0; index < GESTURE_SIZE; index++) { - gesture_item = cJSON_CreateNumber(key_layouts[position].gesture_map[index]); + gesture_item = cJSON_CreateNumber(key_layouts[pos].gesture_map[index]); if (gesture_item == NULL) { @@ -558,6 +569,12 @@ esp_err_t get_layerName_url_handler(httpd_req_t *req) return ESP_OK; } + +static void json_error_generator(char * string, char * error_str) +{ + sprintf(string, "{\"error\":\"%s\"}", error_str); +} + /** * @brief * @@ -568,20 +585,25 @@ esp_err_t delete_layer_url_handler(httpd_req_t *req) { ESP_LOGI(TAG, "HTTP DELETE LAYER --> /api/layers"); ESP_ERROR_CHECK(httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*")); // - // httpd_resp_set_hdr(req, "Access-Control-Allow-Methods", "*"); httpd_resp_set_hdr(req, "Access-Control-Allow-Headers", "Content-Type"); - // httpd_resp_set_hdr(req, "Access-Control-Allow-Credentials", "true"); - // httpd_resp_set_hdr(req, "Access-Control-Max-Age", "3600"); - // httpd_resp_set_hdr(req, "Access-Control-Expose-Headers", "X-Custom-Header"); - // httpd_resp_set_hdr(req, "Vary", "Origin"); + + char string[100]; // Read the URI line and get the host char *buf; size_t buf_len; - char str_param[SHORT_UUID_STR_LEN]; - char int_param[3]; - int position = 0; + char uuid_param[SHORT_UUID_STR_LEN]; + + uint8_t layers_num = nvs_read_num_layers(); + + if (layers_num == 1) + { + ESP_LOGE(TAG, "Only one layer. Cannot delete."); + httpd_resp_set_status(req, HTTPD_500); + httpd_resp_send(req, NULL, 0); + return ESP_OK; + } // Read the URI line and get the parameters buf_len = httpd_req_get_url_query_len(req) + 1; @@ -592,49 +614,54 @@ esp_err_t delete_layer_url_handler(httpd_req_t *req) { ESP_LOGI(TAG, "Found URL query: %s", buf); - if (httpd_query_key_value(buf, "uuid", str_param, sizeof(str_param)) == ESP_OK) + if (httpd_query_key_value(buf, "uuid", uuid_param, sizeof(uuid_param)) == ESP_OK) { - ESP_LOGI(TAG, "The string value = %s", str_param); + ESP_LOGI(TAG, "The string value = %s", uuid_param); } - if (httpd_query_key_value(buf, "pos", int_param, sizeof(int_param)) == ESP_OK) + else { - ESP_LOGI(TAG, "The int value = %s", int_param); - position = atoi(int_param); + ESP_LOGE(TAG, "There is no uuid parameter in the query"); + + // ToDo - Tested this but did not work. have to check more. + // json_error_generator(string,"There is no uuid parameter in the query"); + // httpd_resp_set_type(req, "application/json"); + // httpd_resp_sendstr(req, string); + + httpd_resp_set_status(req, HTTPD_500); + httpd_resp_send(req, NULL, 0); + return ESP_OK; } + + } + else + { + ESP_LOGE(TAG, "There is no uuid parameter in the query"); + httpd_resp_set_status(req, HTTPD_500); + httpd_resp_send(req, NULL, 0); + return ESP_OK; } free(buf); } - if (strcmp(key_layouts[position].uuid_str, str_param) != 0) + int found_flag = 0; + int pos = 0; + for(pos=0; pos < layers_num; pos++) { - - ESP_LOGI(TAG, "key layout uuid %s", key_layouts[position].uuid_str); - ESP_LOGI(TAG, "The string value = %s", str_param); - + if( strcmp(key_layouts[pos].uuid_str, uuid_param) ==0 ) //If both are equal + { + found_flag = 1; //activate found flag + break; //Get off the for loop + } + } + if(!found_flag) //IF not found, return http error + { + ESP_LOGE(TAG, "UUID of element to delete not found"); httpd_resp_set_status(req, HTTPD_400); httpd_resp_send(req, NULL, 0); return ESP_OK; } - nvs_delete_layer(position); - - char *string = NULL; - // cJSON *response_json = cJSON_CreateObject(); - // if (response_json == NULL) - // { - // httpd_resp_set_status(req, HTTPD_400); - // httpd_resp_send(req, NULL, 0); - // return ESP_OK; - // } - - // string = cJSON_Print(response_json); - // if (string == NULL) - // { - // fprintf(stderr, "Failed to print monitor.\n"); - // } - json_response(string); - httpd_resp_set_type(req, "application/json"); - httpd_resp_sendstr(req, string); + nvs_delete_layer(pos); //Deletes the layer found httpd_resp_set_status(req, HTTPD_200); httpd_resp_send(req, NULL, 0); @@ -646,6 +673,32 @@ esp_err_t delete_layer_url_handler(httpd_req_t *req) return ESP_OK; } +esp_err_t options_handler(httpd_req_t *req) { + // Set CORS headers + httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*"); + httpd_resp_set_hdr(req, "Access-Control-Allow-Methods", "POST, GET, PUT, DELETE, OPTIONS"); + httpd_resp_set_hdr(req, "Access-Control-Allow-Headers", "Content-Type"); + + // Respond with a 204 status (No Content) + httpd_resp_set_status(req, "204"); + httpd_resp_send(req, NULL, 0); + + return ESP_OK; +} + +esp_err_t options_restore_handler(httpd_req_t *req) { + // Set CORS headers + httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*"); + httpd_resp_set_hdr(req, "Access-Control-Allow-Methods", "PUT"); + httpd_resp_set_hdr(req, "Access-Control-Allow-Headers", "Content-Type"); + + // Respond with a 204 status (No Content) + httpd_resp_set_status(req, "204"); + httpd_resp_send(req, NULL, 0); + + return ESP_OK; +} + void fill_row(cJSON *row, char names[][10], int codes[]) { int i; @@ -670,12 +723,7 @@ esp_err_t update_layer_url_handler(httpd_req_t *req) ESP_LOGI(TAG, "HTTP PUT --> /api/layers"); ESP_ERROR_CHECK(httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*")); // - // httpd_resp_set_hdr(req, "Access-Control-Allow-Methods", "*"); httpd_resp_set_hdr(req, "Access-Control-Allow-Headers", "Content-Type"); - // httpd_resp_set_hdr(req, "Access-Control-Allow-Credentials", "true"); - // httpd_resp_set_hdr(req, "Access-Control-Max-Age", "3600"); - // httpd_resp_set_hdr(req, "Access-Control-Expose-Headers", "X-Custom-Header"); - // httpd_resp_set_hdr(req, "Vary", "Origin"); char *string = NULL; json_response(string); @@ -691,7 +739,7 @@ esp_err_t update_layer_url_handler(httpd_req_t *req) httpd_req_recv(req, buf, req->content_len); cJSON *payload = cJSON_Parse(buf); - dd_layer temp_layaout; + dd_layer temp_layout; if (NULL == payload) { @@ -712,29 +760,48 @@ esp_err_t update_layer_url_handler(httpd_req_t *req) printf("Layer uuid = \"%s\"\n", layer_uuid->valuestring); } - cJSON *layer_pos = cJSON_GetObjectItem(payload, "pos"); - if (cJSON_IsNumber(layer_pos) && (layer_pos->valueint)) + + int found_flag = 0; + int pos = 0; + for(pos=0; pos < layers_num; pos++) { - printf("Layer pos = \"%d\"\n", layer_pos->valueint); - position = layer_pos->valueint; + if( strcmp(key_layouts[pos].uuid_str, layer_uuid->valuestring) ==0 ) //If both are equal + { + found_flag = 1; //activate found flag + break; //Get off the for loop + } } - - if (strcmp(key_layouts[position].uuid_str, layer_uuid->valuestring) != 0) + if(!found_flag) //IF not found, return http error { - - ESP_LOGI(TAG, "key layout uuid %s", key_layouts[position].uuid_str); - ESP_LOGI(TAG, "The string value = %s", layer_uuid->valuestring); - + ESP_LOGE(TAG, "UUID not found"); httpd_resp_set_status(req, HTTPD_400); httpd_resp_send(req, NULL, 0); return ESP_OK; } - strcpy(temp_layaout.uuid_str, layer_uuid->valuestring); - cJSON *new_layer_name = cJSON_GetObjectItem(payload, "new_name"); + // cJSON *layer_pos = cJSON_GetObjectItem(payload, "pos"); + // if (cJSON_IsNumber(layer_pos) && (layer_pos->valueint)) + // { + // printf("Layer pos = \"%d\"\n", layer_pos->valueint); + // position = layer_pos->valueint; + // } + + // if (strcmp(key_layouts[position].uuid_str, layer_uuid->valuestring) != 0) + // { + + // ESP_LOGI(TAG, "key layout uuid %s", key_layouts[position].uuid_str); + // ESP_LOGI(TAG, "The string value = %s", layer_uuid->valuestring); + + // httpd_resp_set_status(req, HTTPD_400); + // httpd_resp_send(req, NULL, 0); + // return ESP_OK; + // } + strcpy(temp_layout.uuid_str, layer_uuid->valuestring); + + cJSON *new_layer_name = cJSON_GetObjectItem(payload, "name"); if (cJSON_IsString(new_layer_name) && (new_layer_name->valuestring != NULL)) { - strcpy(temp_layaout.name, new_layer_name->valuestring); + strcpy(temp_layout.name, new_layer_name->valuestring); } cJSON *row0 = cJSON_GetObjectItemCaseSensitive(payload, "row0"); @@ -756,13 +823,9 @@ esp_err_t update_layer_url_handler(httpd_req_t *req) { for (j = 0; j < COLS; j++) { - // printf("%s\t", names[i][j]); - - strcpy(temp_layaout.key_map_names[i][j], names[i][j]); + strcpy(temp_layout.key_map_names[i][j], names[i][j]); } - // printf("\n"); } - // printf("\nCodes:\n"); for (i = 0; i < ROWS; i++) { @@ -770,7 +833,7 @@ esp_err_t update_layer_url_handler(httpd_req_t *req) { // printf("%d\t", codes[i][j]); - temp_layaout.key_map[i][j] = codes[i][j]; + temp_layout.key_map[i][j] = codes[i][j]; } // printf("\n"); } @@ -778,14 +841,13 @@ esp_err_t update_layer_url_handler(httpd_req_t *req) cJSON *left_encoder_map = cJSON_GetObjectItem(payload, "left_encoder_map"); if (left_encoder_map == NULL) { - printf("No se encontrĂ³ el objeto 'left_encoder_map'.\n"); + ESP_LOGE(TAG,"left_encoder_map not found"); return 1; } - printf("Elementos del objeto 'left_encoder_map':\n"); cJSON_ArrayForEach(item, left_encoder_map) { - printf("%s: %d\n", item->string, item->valueint); - temp_layaout.left_encoder_map[i] = item->valueint; + // printf("%s: %d\n", item->string, item->valueint); + temp_layout.left_encoder_map[i] = item->valueint; i++; } @@ -793,16 +855,16 @@ esp_err_t update_layer_url_handler(httpd_req_t *req) cJSON *right_encoder_map = cJSON_GetObjectItem(payload, "right_encoder_map"); cJSON_ArrayForEach(item, right_encoder_map) { - printf("%s: %d\n", item->string, item->valueint); - temp_layaout.right_encoder_map[i] = item->valueint; + // printf("%s: %d\n", item->string, item->valueint); + temp_layout.right_encoder_map[i] = item->valueint; i++; } i = 0; cJSON *gesture_map = cJSON_GetObjectItem(payload, "gesture_map"); cJSON_ArrayForEach(item, gesture_map) { - printf("%s: %d\n", item->string, item->valueint); - temp_layaout.gesture_map[i] = item->valueint; + // printf("%s: %d\n", item->string, item->valueint); + temp_layout.gesture_map[i] = item->valueint; i++; } @@ -810,16 +872,15 @@ esp_err_t update_layer_url_handler(httpd_req_t *req) bool active = cJSON_IsTrue(is_active); if (active) { - temp_layaout.active = active; + temp_layout.active = active; } else { - temp_layaout.active = false; + temp_layout.active = false; } cJSON_Delete(payload); free(buf); - nvs_write_layer(temp_layaout, position); - // apds9960_free(); + nvs_write_layer(temp_layout, pos); httpd_resp_set_type(req, "application/json"); httpd_resp_sendstr(req, string); @@ -916,11 +977,15 @@ esp_err_t create_layer_url_handler(httpd_req_t *req) char names[ROWS][COLS][10]; int codes[ROWS][COLS]; + ESP_LOGI(TAG, "HTTP POST Create Layer --> /api/layers - Working so far?"); + fill_row(row0, names[0], codes[0]); fill_row(row1, names[1], codes[1]); fill_row(row2, names[2], codes[2]); fill_row(row3, names[3], codes[3]); + ESP_LOGI(TAG, "HTTP POST Create Layer --> /api/layers - Working so far2?"); + int i, j; // printf("Names:\n"); for (i = 0; i < ROWS; i++) @@ -1152,6 +1217,7 @@ httpd_handle_t start_webserver(void) httpd_register_uri_handler(server, &change_led_color_url__); ///////LAYERS + httpd_uri_t get_layer_url = {.uri = "/api/layers", .method = HTTP_GET, .handler = get_layer_url_handler, .user_ctx = NULL}; httpd_register_uri_handler(server, &get_layer_url); httpd_uri_t get_layerName_url = {.uri = "/api/layers/layer_names", .method = HTTP_GET, .handler = get_layerName_url_handler, .user_ctx = NULL}; @@ -1160,14 +1226,16 @@ httpd_handle_t start_webserver(void) httpd_register_uri_handler(server, &delete_layer_url); httpd_uri_t create_layer_url = {.uri = "/api/layers", .method = HTTP_POST, .handler = create_layer_url_handler, .user_ctx = NULL}; httpd_register_uri_handler(server, &create_layer_url); - httpd_uri_t create_layer_url__ = {.uri = "/api/layers", .method = HTTP_OPTIONS, .handler = create_layer_url_handler, .user_ctx = NULL}; - httpd_register_uri_handler(server, &create_layer_url__); + httpd_uri_t layer_options_url = {.uri = "/api/layers", .method = HTTP_OPTIONS, .handler = options_handler, .user_ctx = NULL}; + httpd_register_uri_handler(server, &layer_options_url); httpd_uri_t update_layer_url = {.uri = "/api/layers", .method = HTTP_PUT, .handler = update_layer_url_handler, .user_ctx = NULL}; httpd_register_uri_handler(server, &update_layer_url); httpd_uri_t restore_default_layer_url = {.uri = "/api/layers/restore", .method = HTTP_PUT, .handler = restore_default_layer_url_handler, .user_ctx = NULL}; httpd_register_uri_handler(server, &restore_default_layer_url); + httpd_uri_t layer_restore_options_url = {.uri = "/api/layers/restore", .method = HTTP_OPTIONS, .handler = options_restore_handler, .user_ctx = NULL}; + httpd_register_uri_handler(server, &layer_restore_options_url); // httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*"); diff --git a/sdkconfig b/sdkconfig index 6c1654b2..b5fbd16e 100644 --- a/sdkconfig +++ b/sdkconfig @@ -530,9 +530,7 @@ CONFIG_EFUSE_MAX_BLK_LEN=192 CONFIG_ESP_TLS_USING_MBEDTLS=y # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set # CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set -CONFIG_ESP_TLS_SERVER=y -# CONFIG_ESP_TLS_SERVER_SESSION_TICKETS is not set -# CONFIG_ESP_TLS_SERVER_MIN_AUTH_MODE_OPTIONAL is not set +# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_PSK_VERIFICATION is not set # CONFIG_ESP_TLS_INSECURE is not set # end of ESP-TLS @@ -623,7 +621,7 @@ CONFIG_ETH_USE_SPI_ETHERNET=y # # Event Loop Library # -CONFIG_ESP_EVENT_LOOP_PROFILING=y +# CONFIG_ESP_EVENT_LOOP_PROFILING is not set CONFIG_ESP_EVENT_POST_FROM_ISR=y CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y # end of Event Loop Library @@ -640,7 +638,7 @@ CONFIG_ESP_GDBSTUB_MAX_TASKS=32 # ESP HTTP client # CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y -CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH=y +# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH=y # end of ESP HTTP client @@ -664,7 +662,7 @@ CONFIG_HTTPD_PURGE_BUF_LEN=32 # # ESP HTTPS server # -CONFIG_ESP_HTTPS_SERVER_ENABLE=y +# CONFIG_ESP_HTTPS_SERVER_ENABLE is not set # end of ESP HTTPS server # @@ -686,10 +684,11 @@ CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 # # Sleep Config # -CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +# CONFIG_ESP_SLEEP_POWER_DOWN_FLASH is not set CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y # CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set -# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set +CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND=y +# CONFIG_ESP_SLEEP_MSPI_NEED_ALL_IO_PU is not set # end of Sleep Config # @@ -1477,7 +1476,7 @@ CONFIG_WL_SECTOR_SIZE=4096 CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 # CONFIG_WIFI_PROV_BLE_BONDING is not set -CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y +# CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION is not set # CONFIG_WIFI_PROV_KEEP_BLE_ON_AFTER_PROV is not set # end of Wi-Fi Provisioning Manager @@ -1780,7 +1779,7 @@ CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y # CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set # CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set # CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set -CONFIG_EVENT_LOOP_PROFILING=y +# CONFIG_EVENT_LOOP_PROFILING is not set CONFIG_POST_EVENTS_FROM_ISR=y CONFIG_POST_EVENTS_FROM_IRAM_ISR=y CONFIG_GDBSTUB_SUPPORT_TASKS=y @@ -1788,7 +1787,7 @@ CONFIG_GDBSTUB_MAX_TASKS=32 # CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 -CONFIG_ESP_SYSTEM_PD_FLASH=y +# CONFIG_ESP_SYSTEM_PD_FLASH is not set # CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND is not set CONFIG_IPC_TASK_STACK_SIZE=1024 CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y diff --git a/sdkconfig.old b/sdkconfig.old index 6c1654b2..b5fbd16e 100644 --- a/sdkconfig.old +++ b/sdkconfig.old @@ -530,9 +530,7 @@ CONFIG_EFUSE_MAX_BLK_LEN=192 CONFIG_ESP_TLS_USING_MBEDTLS=y # CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set # CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set -CONFIG_ESP_TLS_SERVER=y -# CONFIG_ESP_TLS_SERVER_SESSION_TICKETS is not set -# CONFIG_ESP_TLS_SERVER_MIN_AUTH_MODE_OPTIONAL is not set +# CONFIG_ESP_TLS_SERVER is not set # CONFIG_ESP_TLS_PSK_VERIFICATION is not set # CONFIG_ESP_TLS_INSECURE is not set # end of ESP-TLS @@ -623,7 +621,7 @@ CONFIG_ETH_USE_SPI_ETHERNET=y # # Event Loop Library # -CONFIG_ESP_EVENT_LOOP_PROFILING=y +# CONFIG_ESP_EVENT_LOOP_PROFILING is not set CONFIG_ESP_EVENT_POST_FROM_ISR=y CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y # end of Event Loop Library @@ -640,7 +638,7 @@ CONFIG_ESP_GDBSTUB_MAX_TASKS=32 # ESP HTTP client # CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y -CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH=y +# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set CONFIG_ESP_HTTP_CLIENT_ENABLE_DIGEST_AUTH=y # end of ESP HTTP client @@ -664,7 +662,7 @@ CONFIG_HTTPD_PURGE_BUF_LEN=32 # # ESP HTTPS server # -CONFIG_ESP_HTTPS_SERVER_ENABLE=y +# CONFIG_ESP_HTTPS_SERVER_ENABLE is not set # end of ESP HTTPS server # @@ -686,10 +684,11 @@ CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 # # Sleep Config # -CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +# CONFIG_ESP_SLEEP_POWER_DOWN_FLASH is not set CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y # CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set -# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set +CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND=y +# CONFIG_ESP_SLEEP_MSPI_NEED_ALL_IO_PU is not set # end of Sleep Config # @@ -1477,7 +1476,7 @@ CONFIG_WL_SECTOR_SIZE=4096 CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16 CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30 # CONFIG_WIFI_PROV_BLE_BONDING is not set -CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y +# CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION is not set # CONFIG_WIFI_PROV_KEEP_BLE_ON_AFTER_PROV is not set # end of Wi-Fi Provisioning Manager @@ -1780,7 +1779,7 @@ CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y # CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set # CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set # CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set -CONFIG_EVENT_LOOP_PROFILING=y +# CONFIG_EVENT_LOOP_PROFILING is not set CONFIG_POST_EVENTS_FROM_ISR=y CONFIG_POST_EVENTS_FROM_IRAM_ISR=y CONFIG_GDBSTUB_SUPPORT_TASKS=y @@ -1788,7 +1787,7 @@ CONFIG_GDBSTUB_MAX_TASKS=32 # CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 -CONFIG_ESP_SYSTEM_PD_FLASH=y +# CONFIG_ESP_SYSTEM_PD_FLASH is not set # CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND is not set CONFIG_IPC_TASK_STACK_SIZE=1024 CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y