What I m doing wrong with Webserver lib

Nathan_44
Posts: 2
Joined: Mon May 19, 2025 4:12 pm

What I m doing wrong with Webserver lib

Postby Nathan_44 » Mon May 19, 2025 4:32 pm

Hello, I m trying to use this library https://github.com/pangodream/ESP2SOTA/ ... P2SOTA.cpp
The code is light but It don't work on my side. The device freeze after the OTA update, I need to powercycle it to have it working again.

I have tried to add a reset page

Code: Select all

  //Display reset page
  server.on("/reset", HTTP_GET, [&]() {
    server.sendHeader(F("Connection"), F("close"));
    server.send(200, F("text/plain"), F("Reset device!"));
    ESP.restart();
  });
It work, it restart but don't display the message, so from a forum I have found the solution, I need to use

Code: Select all

  //Display reset page
  server.on("/reset", HTTP_GET, [&]() {
    server.sendHeader(F("Connection"), F("close"));
    server.send(200, F("text/plain"), F("Reset device!"));
    server.stop();
    delay(2000);
    ESP.restart();
    delay(2000);
  });
But I use the same tricks for the OTA, I don't have the freeze, but I still haven't the message

Code: Select all

  /*handling uploading firmware file */
  server.on("/update", HTTP_POST, [&]() {
    server.sendHeader(F("Connection"), F("close"));
    server.send(200, "text/plain", (Update.hasError()) ? "FAIL" : "OK");
    server.stop();
    delay(2000);
    ESP.restart();
    delay(2000);
  }, [&]()
What I m missing ?

Nathan_44
Posts: 2
Joined: Mon May 19, 2025 4:12 pm

Re: What I m doing wrong with Webserver lib

Postby Nathan_44 » Sat Jul 05, 2025 10:49 am

I m perhaps at wrong place ? ^^
But I don't see where to ask for help for a specific lib ?

Sprite
Espressif staff
Espressif staff
Posts: 10599
Joined: Thu Nov 26, 2015 4:08 am

Re: What I m doing wrong with Webserver lib

Postby Sprite » Mon Jul 07, 2025 2:05 am

I don't think anyone here is familiar with the lib... unless can debug the issue yourself, your best bet may be to file an issue on the libraries Github.

Who is online

Users browsing this forum: Barkrowler, ChatGPT-User, Google [Bot], meta-externalagent, PerplexityBot and 3 guests