Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ dependencies:
rules:
- if: "target in [esp32s3, esp32p4]"
espressif/esp_hosted:
version: "^2.8.0"
version: "^2.9.2"
rules:
- if: "target == esp32p4"
espressif/esp_wifi_remote:
Expand Down
10 changes: 7 additions & 3 deletions libraries/ESP_HostedOTA/src/ESP_HostedOTA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ bool updateEspHostedSlave() {
NetworkClient *stream = https.getStreamPtr();

// Step 11: Initialize the ESP-Hosted update process
Serial.println("Beginning update process...");
if (!hostedBeginUpdate()) {
Serial.println("ERROR: esp-hosted update start failed!");
https.end();
Expand Down Expand Up @@ -118,21 +119,24 @@ bool updateEspHostedSlave() {

// Step 14: Check if entire firmware has been downloaded
if (len == 0) {
Serial.println();
// Finalize the update process
Serial.println("Finalizing update process...");
if (!hostedEndUpdate()) {
Serial.println("\nERROR: esp-hosted update end failed!");
Serial.println("ERROR: esp-hosted update end failed!");
break;
}

// Activate the new firmware
Serial.println("Activating new firmware...");
if (!hostedActivateUpdate()) {
Serial.println("\nERROR: esp-hosted update activate failed!");
Serial.println("ERROR: esp-hosted update activate failed!");
break;
}

// Update completed successfully
updateSuccess = true;
Serial.println("\nSUCCESS: esp-hosted co-processor updated!");
Serial.println("SUCCESS: esp-hosted co-processor updated!");
break;
}
}
Expand Down
Loading