Everything works perfectly when the ESP32-C3 is configured as a Station, using `example_connect()` from: https://github.com/espressif/esp-idf/bl ... /README.md
However, when switching to Access Point mode, using `softAP` from: https://github.com/espressif/esp-idf/tr ... ted/softAP), the webserver becomes extremely unreliable.
Here are some of the issues I am seeing:
- Severe packet loss when pinging the ESP:
--- 192.168.4.1 ping statistics ---
930 packets transmitted, 367 received, +140 errors, 60.5376% packet loss, time 945227ms
rtt min/avg/max/mdev = 2.641/863.794/12337.996/1883.675 ms, pipe 13
- Connecting to the webserver often fails, showing messages like: "Unable to connect" or "The connection has timed out"
- When the webpage does load, interactions (like pressing a button) sometimes work instantly, but often take up to 20 seconds to respond, if they respond at all
Code: Select all
static httpd_handle_t start_webserver(void) {
httpd_handle_t server = NULL;
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
config.lru_purge_enable = true;
ESP_LOGI(TAG, "Starting server on port: %d", config.server_port);
if (httpd_start(&server, &config) == ESP_OK) {
ESP_LOGI(TAG, "Registering URI handlers");
httpd_register_uri_handler(server, &home);
httpd_register_uri_handler(server, &set);
return server;
}
ESP_LOGI(TAG, "Error starting server!");
return NULL;
}Does anyone know what might cause such instability in softAP mode?
Are there known limitations, configuration tweaks or best practices to improve the performance?
Thanks in advance for your help!