I have an ESP32-C3 project. Even though I have defined the esp_http_server header file and enabled CONFIG_HTTPD_WS_SUPPORT, the ESP-IDE still returns the following message: "Type 'httpd_ws_frame_t' could not be resolved". How can i fix it ? Here's what i included in my project :
#include "stdio.h"
#include "string.h"
#include "unistd.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_mac.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_log.h"
#include "esp_system.h"
#include "esp_http_server.h"
#include "esp_tls.h"
#include "esp_timer.h"
#include "esp_task_wdt.h"
#include "esp_netif.h"
#include "esp_eth.h"
#include "esp_http_server.h"
#include "nvs_flash.h"
#include "lwip/err.h"
#include "lwip/sys.h"
#include "lwip/sockets.h"
#include "lwip/netdb.h"
#include "lwip/udp.h"
#include "sys/param.h"
#include "nvs_flash.h"
#include "driver/uart.h"
#include "driver/gpio.h"
#include "cJSON.h"
Can't use httpd_ws_frame_t structure in ESP32-C3
-
- Posts: 1734
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Can't use httpd_ws_frame_t structure in ESP32-C3
1) make sure your project REQUIRES esp_http_server in CMakeLists.txt
2) reconfigure/rebuild the project; this may nudge the IDE to re-evaluate and pick up all include paths.
2) reconfigure/rebuild the project; this may nudge the IDE to re-evaluate and pick up all include paths.
Re: Can't use httpd_ws_frame_t structure in ESP32-C3
Hi, the problem lies in the sdkonfig file. To support WebSocket and use the httpd_ws_frame_t you have to enable this paramenter CONFIG_HTTPD_WS_SUPPORT, you can find it in the sdconfig file and enable it using the command:
idf.py menuconfig
and going to Component config > HTTP Server.
You can find the reference here https://docs.espressif.com/projects/esp ... ws-support
idf.py menuconfig
and going to Component config > HTTP Server.
You can find the reference here https://docs.espressif.com/projects/esp ... ws-support
Who is online
Users browsing this forum: axellin and 80 guests