hi everyone, i have random wdt.
E (285848) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (285848) task_wdt: - IDLE0 (CPU 0)
E (285848) task_wdt: Tasks currently running:
E (285848) task_wdt: CPU 0: Task0
E (285848) task_wdt: CPU 1: IDLE1
E (285848) task_wdt: Aborting.
abort() was called at PC 0x40174258 on core 0
ELF file SHA256: 0000000000000000
Backtrace: 0x400887e8:0x3ffbfa70 0x40088a65:0x3ffbfa90 0x40174258:0x3ffbfab0 0x40086f25:0x3ffbfad0 0x4000bfed:0x3ffdb970 0x4008abe9:0x3ffdb980 0x400894e1:0x3ffdb9a0 0x40166866:0x3ffdb9e0 0x4015633c:0x3ffdba00 0x400d8981:0x3ffdba20 0x400d89e6:0x3ffdba50 0x400d8a55:0x3ffdba70 0x400d8e96:0x3ffdba90 0x4018afb6:0x3ffdbac0 0x400ea915:0x3ffdbaf0 0x400ea9ad:0x3ffdbb10 0x400de266:0x3ffdbb30 0x400dc9e9:0x3ffdbcf0 0x400d82e2:0x3ffdbd40 0x400d3b00:0x3ffdbd60 0x40089a76:0x3ffdbd80
Rebooting...
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,l
2021-10-26 12:15:37.713
en:10124
load:0x40080400,len:5828
entry 0x400806a8
Decoding stack results
0x400887e8: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 156
0x40088a65: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 171
0x40174258: task_wdt_isr at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c line 174
0x4008abe9: vTaskExitCritical at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c line 4274
0x400894e1: xQueueGenericSend at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c line 828
0x40166866: sys_mutex_unlock at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/port/esp32/freertos/sys_arch.c line 93
0x4015633c: lwip_ioctl_r at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/lwip/lwip/src/api/sockets.c line 3489
0x400d8981: WiFiClientRxBuffer::r_available() at C:.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiClient.cpp line 49
0x400d89e6: WiFiClientRxBuffer::fillBuffer() at C:.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiClient.cpp line 71
0x400d8a55: WiFiClientRxBuffer::read(unsigned char, unsigned int) at C:.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiClient.cpp line 107
0x400d8e96: WiFiClient::read(unsigned char, unsigned int) at C:.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiClient.cpp line 437
0x4018afb6: WiFiClient::read() at C:.platformio\packages\framework-arduinoespressif32\libraries\WiFi\src\WiFiClient.cpp line 345
0x400ea915: Stream::timedRead() at C:.platformio\packages\framework-arduinoespressif32\cores\esp32\Stream.cpp line 36
0x400ea9ad: Stream::readStringUntil(char) at C:.platformio\packages\framework-arduinoespressif32\cores\esp32\Stream.cpp line 330
0x400de266: WebServer::_parseRequest(WiFiClient&) at C:.platformio\packages\framework-arduinoespressif32\libraries\WebServer\src\Parsing.cpp line 78
0x400dc9e9: WebServer::handleClient() at C:.platformio\packages\framework-arduinoespressif32\libraries\WebServer\src\WebServer.cpp line 310
0x400d82e2: webserver_loop() at src\webserver_pro.cpp line 312
0x400d3b00: Task0code(void*) at src\main.cpp line 41
0x40089a76: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143
but don't know how to fix.
Can it handle multipart form? I browsed the readme, but the only thing I could find was multipart()
that returns true/false. I want to know whether it can read values from a multipart POST. I confirmed that my POST code works correctly by posting it to https://httpbin.org/post; it returned
{
"args": {},
"data": "",
"files": {},
"form": {
"cat": "\u0001\u0002\u0000\u0003\u0004",
"dog": "hello"
},
"headers": {
"Content-Length": "265",
"Content-Type": "multipart/form-data; boundary=\"8a9f2dc0-11a8-451a-9d5e-376624de7af7\"",
"Host": "httpbin.org", .....
So, I want to get that "dog" and "cat" in my ESP. But when I listed all arguments using the readme code:
//List all parameters (Compatibility)
int args = request->args();
for (int i = 0; i < args; i++)
{
Serial.printf("ARG[%s]: %s\n", request->argName(i).c_str(), request->arg(i).c_str());
}
what I got was:
ARG[o]:
ARG[a]: ␁␂
So, how can I get the string "hello" for the "dog" argument, and { 0x01, 0x02, 0x00, 0x03, 0x04 } for the "cat" argument? Is it supported? Any example?
How can I alter content based on a GET requests accept header?
I have a piece of code that looks like this:
server.on("/", HTTP_GET, [](AsyncWebServerRequest * request) {
request->send(SPIFFS, "/index.html", String(), false);
});
which works as designed. However I need to send back different data, depending on the Accept header. Something like this:
server.on("/", HTTP_GET, [](AsyncWebServerRequest * request) {
if (request->contentType() == "application/json") {
request->send(200, "text/json", String(publishData));
} else {
request->send(SPIFFS, "/index.html", String(), false);
}});
Doesn't seem to work. What do I miss?
Hi!
I just couldn't find any working examples for TLS so I made an example sketch for TLS WebServer using this library.
Check it out here: https://gitlab.com/artonworkstm/asyncwebservertls
Also want to fasten up a bit the request process by caching sessions so there is no need to redo the whole handshake at every request.
Do you guys know how may I achieve that?
I found it in the ESP8266WiFi library that you can use there (tho I couldn't make it work).
The Session class is here at line 139: https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/BearSSLHelpers.h
Content-Type: application/javascript
for jQuery.min
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request)
{
request->send_P(200, "text/html", HTMLhead);
request->send_P(200, "text/html", HTMLmain);
request->send_P(200, "text/html", HTMLfoot);
});
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request)
{
AsyncResponseStream *response = request->beginResponseStream("text/html");
response->printf_P(HTMLhead);
response->printf_P(HTMLMain);
response->printf_P(HTMLfoot);
request->send(response);
});
Hi all. Fairly new and very sorry if answered as I've looked but I'm trying to use AsyncWebServer with SdFat and 128 GB exFAT SDHC. I'm having issues with the following lines in my code since I'm not using SD.h
request->send(SD, "/index.html", "text/html");
});
server.serveStatic("/", SD, "/");
I've tried changing SD
to sd
, and file
objects without success. Also tried FS
and fs
with no luck. I'm fairly new and jsut not sure what filesystem to send from SdFat for request->send
hi all
I made a couple of header file for different prepherals + header file for my asyncserver & asyncwebsocket
my_wifi.h
AsyncWebServer server(80);
AsyncWebSocket WS("/ws");
in other header file I have sensor to measure sumeting and send through websocket
my_sensor.h
WS.textAll(my_data);
but it can not see my WS instance error: 'WS' was not declared in this scope
does anyone know how can I pass my WS instance to other header files
Hi guys, i still have a problem - no idea what to do, heres again my question: I am reading an value continously in my main/loop-code and writing it in a global variabal. in my server.on callback/handler function i am reading this value and returning it to the clients browser. for sure its crashing when i write it the same time.
Q1: how is the best way to avoid this (i am using a locked-variable at the moment).
Q2: since its async somehow, is there task scheduling and running on different cores@esp32 involved? Best way to exchange "data"/share aviables between "global code" and webserver(callbacks?
Hope im not mixing things too much - and sri for some rookie questening stuff :) Tnx for your support. M.
why not with websocket?
WS.text(WSclinet,data);
however after a while _messageQueue.length()
exceeded of maximum size and throw ERROR: Too many messages queued
, does anyone know how to solve it
clearQ
after each transmitting void AsyncWebSocket::clearQ(uint32_t id){
AsyncWebSocketClient * c = client(id);
if(c)
c->QueuFree();
}
.......
void AsyncWebSocketClient::QueuFree(){
_messageQueue.free();
}