I am trying to apply OTA to the ESP32-CAM. But there seems to be no ‘server’ object to attach to.
Hi Sara
First I would like to say how much I appreciate your work. Your examples cover real world situations and I have implemented a surveillance camera sending e-mails when a person is detected.
In your ESP32-CAM book to start the camera and its webserver you typically use the line
// Initialize the Camera
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
Serial.printf("Camera init failed with error 0x%x", err);
return;
}
or in the example sketch ‘CameraWebServer’ we have the line
startCameraServer();
In both cases there is no obvious declaration of a ‘server’ object.
Q1: Does this mean I cannot attach OTA to this type of webserver?
Q2: Should OTA work if I create an additional Webserver with
AsyncWebServer server(80);
?
Thanks and kind regards
Robert
Addition: obviously I wolud have to use a different port number than 80, as 80 and 81 are already used by the camera
Hi.
Take a look at this discussion and see if it helps: https://arduino.stackexchange.com/questions/75198/why-doesnt-ota-work-with-the-ai-thinker-esp32-cam-board
They provide an example of how to implement the “regular” OTA routine.
Does this help?
Regards,
Sara