ESP32 webserver expert needed

Job ID: 34512824

Budget: £20 – £70 GBP

I need a ESP32 expert to help me improve an ongoing robotic vehicle project that involves a Mars Rover-like robot that will be operating in a hands-on science museum. Here is the first issue I need help with:

I have a complex Arduino application running on a ESP32 inside a Mars Rover. The ESP32 is acting as a webserver. A control station computer sends commands to the webserver to tell the rover to do things. And the rover sends back sensor data. The ESP32 program does what it's supposed to do when it's functioning, but sometimes the ESP32 becomes unresponsive and stops taking commands from the control station. It can be just after completing a request or seemingly random. From what I can tell (by periodically flashing an LED from within the main loop), the program on the ESP32is still running through the main loop, but the webserver.handleClient is no longer responding to client requests. It's like the webserver crashed (if that's possible) or is stuck elsewhere waiting for something. But I have no knowledge of how to check for that or see that. My only way to resolve the issue is to reboot the rover and restart the app that's running on the control station. From within the esp32 program, I would like to find a way to detect that the webserver has become unresponsive and restart it and/or find a way to prevent the unresponsiveness from happening to begin with.

I am using Arduino-based code (not the Espressif-IDF).

I am using the ESP32 webserver approach that involves...
#include WiFi.h
#include WebServer.h
webserver.begin
webserver.on
webserver.handleClient (in the main loop)
And so on.

Please note that there is no HTML user interface. The webserver receives a http request from the control station and responds to it with JSON-formatted sensor data (which the control station app then receives, parses, and displays on screen).

The rover's entire program is already written and working (other than the periodic hangs). I feel like I'm close, but I need someone who knows ESP32 better and deeper than I do to help me get it across the goal line. I would like to stick with the basic approach I've mentioned above rather than changing to an entirely different approach (like websockets, asynchronous webserver, or something like that). But, if we have to, we could possiblly change to a different communication approach on the ESP32, but I would need a lot of help with that. My first choice would be to add resiliency to the approach I've started rather than ditch this approach and try something else.

Once we start working together, I'll provide all my existing code and more details of when the failure occurs, etc. It will be difficult to replicate the problem at your location because you don't have the rover, etc., so you'll need to give me tips, guidance, and code, which I'll then test here.

Once we resolve this primary issue, then we can move on to other improvements/issues.

please start to bid with "firmware developer".

I'm thinking we should handle this on an hourly basis, and then I'll provide a good bonus if/when we resolve the problem.
Related categories: C Programming Linux Microcontroller Arduino