You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
I've tried to run the AsyncWebServer on an ESP32 to serve files from the SD card (connected as SPI // not 1bit or 4bit connections).
So I'm basically using SD and FS libraries and I've tried these initiators : server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){ request->send(SPIFFS, "/index.htm", "text/html"); }); < Working 100% and relatively fast server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){ request->send(SD, "/webui/index.htm", "text/html"); }); < Do not work at all on small files, large files goes the same (starts to appear on browser very slowly and at some point, ESP32 crashes with the following :
task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
task_wdt: - async_tcp (CPU 0/1)
task_wdt: Tasks currently running:
task_wdt: CPU 0: IDLE
task_wdt: CPU 1: loopTask
server.serveStatic("/", SD, "/"); < crashes exactly the same as request->send(SD, "/webui/index.htm", "text/html");
Is there any way to get this library to work with SD card files and folders ?
In my scenario, I have those files loading :
1 HTML page (~20KB)
3 JS scripts (~100KB all)
1 CSS file (~100KB)
1 image file (~40KB)
TOTAL : ~260KB
When using SPIFFS storage, everything goes fine and fast, but when I try to use SD, not even any single file loads correctly.
Does someone have any idea of what could be the culprit ?
Things to know : I'm actually just testing on a very small and up to date environment :
The text was updated successfully, but these errors were encountered:
simkard69
changed the title
SD card as source for files
SD card as source for files : very slow and crashes ESP32 most of the time (watchdog got triggered ...)
Feb 21, 2022
Ok so finally, this is not related to this library which works, VERY GOOD.
Anyway it was not my culprit too, neither my wiring or anything hardware related.
Check the end of this post, you'll know the truth : #770
Fact is that arduino-esp32 v2.0.2 contains a bug on file sd_diskio.cpp at line 612 exactly.
Apply the fix and voilà, problem solved !
Hello Everyone,
I've tried to run the AsyncWebServer on an ESP32 to serve files from the SD card (connected as SPI // not 1bit or 4bit connections).
So I'm basically using SD and FS libraries and I've tried these initiators :
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){ request->send(SPIFFS, "/index.htm", "text/html"); });
< Working 100% and relatively fastserver.on("/", HTTP_GET, [](AsyncWebServerRequest *request){ request->send(SD, "/webui/index.htm", "text/html"); });
< Do not work at all on small files, large files goes the same (starts to appear on browser very slowly and at some point, ESP32 crashes with the following :server.serveStatic("/", SD, "/");
< crashes exactly the same asrequest->send(SD, "/webui/index.htm", "text/html");
Is there any way to get this library to work with SD card files and folders ?
In my scenario, I have those files loading :
TOTAL : ~260KB
When using SPIFFS storage, everything goes fine and fast, but when I try to use SD, not even any single file loads correctly.
Does someone have any idea of what could be the culprit ?
Things to know : I'm actually just testing on a very small and up to date environment :
The text was updated successfully, but these errors were encountered: