Closed as not planned
Description
Board
ESP32 CAM
Device Description
Hardware Configuration
Version
v3.0.0
IDE Name
PlatformIO
Operating System
Windows 10
Flash frequency
what's in the platformio json files
PSRAM enabled
yes
Upload speed
OTA
Description
OTA times out.
If I comment out line webText += String( 161 );
OTA completes fine.
In v2 I can add whatever text to it and OTA always works just fine.
Sketch
void initOTA( void ) {
ArduinoOTA.setHostname( "OTA-min" );
ArduinoOTA
.onStart([]() {
String type;
if (ArduinoOTA.getCommand() == U_FLASH)
type = "sketch";
else // U_SPIFFS
type = "filesystem";
esp_err_t err = esp_camera_deinit();
Serial.println("Start updating " + type);
})
.onEnd([]() {
Serial.println("\nEnd");
})
.onProgress([](unsigned int progress, unsigned int total) {
Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
})
.onError([](ota_error_t error) {
Serial.printf("Error[%u]: ", error);
if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
else if (error == OTA_END_ERROR) Serial.println("End Failed");
});
ArduinoOTA.begin();
}
void initWiFi( void ) {
WiFi.softAPdisconnect( true );
WiFi.setMinSecurity( WIFI_AUTH_WPA_PSK );
WiFi.mode( WIFI_STA );
WiFi.setHostname( "OTA-min" );
WiFi.begin( ssid, password );
WiFi.setSleep( false );
}
void asyncHandleRoot( AsyncWebServerRequest *request ) {
String webText;
webText = "<!doctype html><html><head><title>OTA Minimum</title></head><body>";
webText += "OTA Minimum<br>";
webText += "161";
webText += String( 161 );
webText += "</body></html>";
request->send( 200, "text/html", webText );
}
void asyncHandleNotFound( AsyncWebServerRequest *request ) {
request->send( 404 );
}
void initAsyncWebServer( void ) {
asyncWebServer.on( "/", HTTP_GET, asyncHandleRoot );
asyncWebServer.onNotFound( asyncHandleNotFound );
asyncWebServer.begin();
}
void setup() {
Serial.begin( 115200 );
delay( 400 );
initWiFi();
initAsyncWebServer();
initOTA();
}
void loop() {
ArduinoOTA.handle();
}
Debug Message
Linking .pio\build\esp32cam\firmware.elf
Retrieving maximum program size .pio\build\esp32cam\firmware.elf
Checking size .pio\build\esp32cam\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 16.1% (used 52632 bytes from 327680 bytes)
Flash: [======= ] 66.3% (used 1304357 bytes from 1966080 bytes)
Building .pio\build\esp32cam\firmware.bin
esptool.py v4.5.1
Creating esp32 image...
Merged 27 ELF sections
Successfully created esp32 image.
Configuring upload protocol...
AVAILABLE: cmsis-dap, esp-bridge, esp-prog, espota, esptool, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa
CURRENT: upload_protocol = espota
Uploading .pio\build\esp32cam\firmware.bin
00:17:54 [DEBUG]: Options: Namespace(esp_ip='192.168.1.161', host_ip='0.0.0.0', esp_port=3232, host_port=49083, auth='', image='.pio\\build\\esp32cam\\firmware.bin', spiffs=False, debug=True, progress=True, timeout=10)
00:17:54 [INFO]: Starting on 0.0.0.0:49083
00:17:54 [INFO]: Upload size: 1310928
Sending invitation to 192.168.1.161
00:17:54 [INFO]: Waiting for device...
00:18:04 [ERROR]: No response from device
*** [upload] Error 1
================================================================================== [FAILED] Took 98.73 seconds ==================================================================================
Environment Status Duration
------------- -------- ------------
esp32cam FAILED 00:01:38.730
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Metadata
Metadata
Assignees
Type
Projects
Status
Done