PC: 0x400014e8
EXCVADDR: 0xa341aa24
Decoding stack results
0x400d1335: Print::write(char const*) at C:\Users\pramu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/Print.h line 67
0x400d1369: Print::println(char const*) at C:\Users\pramu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32\Print.cpp line 89
0x400d0509: keepWiFiAlive(void*) at C:\Users\pramu\Desktop\New folder\WIFI_19JUN/WIFI_19JUN.ino line 36
0x40089792: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143
Sorry not much help on that particular error. I do use a task to post data to a website but the debug prints print into to a buffer and in the main loop print from that.
Actually you should not need a RTOS task to connect/reconnect the WiFi. I have similar code but do it all from the main loop using simple method 'tasks'
See Multi-tasking in Arduino
I'm not sure if that while-loop in which the reconnect occurs if the system is not currently connected will be allowed by RTOS given its very long (in processing terms) maximum timespan. In any case, something doesn't feel right if you're trying to run a fairly heavy/complex task this way. Instead of using the RTOS task scheduler, I'd just call this routine directly from your code at appropriate moments.
My (limited) experience with the ESP32 watchdog systems is that they're pretty strict and trigger-happy. I'd prevent getting caught in their hands as much as possible.
Thanks a lot. I have several other tasks to include and wants to use a RTOS. I started with WiFi connection as the first task and other tasks are to be included later.
I see; well, I can't offer much help unfortunately; I hope you get it to work somehow. But I think at this point I'd call it a day with the task scheduler unless there was a good reason that would preclude any other option.
Due to the exception type could be the stack size too small.
Furthermore i think it's better feed the watchdog in the while loop with yield or vTaskDelay.
This works for me. The "disconnectWiFi" task is there just to periodically disconnect the WiFi and demonstrate automatic reconnection. You obviously wouldn't include it in your real application. In order to see the log prints, set the debug level (Tools menu) to 'Info'.
This does not do what you think it does. The string literal (between double quotes) decays to a pointer to the first character, and the IP address is implicitly converted to uint32_t, so when you add that to the pointer, you end up with a pointer that points way beyond the string.
I recommend against using the String + operator (Taming Arduino Strings )
It uses twice the memory and often does not work as expected.
To work the String + operator needs at least one side of the + to be a String.
However at noted above, in this case neither side was a String.
Confusing because