diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 29f866d2..880cc674 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -268,7 +268,9 @@ jobs: zip -r ../release/update.zip . cd ../firmware zip -r ../release/initial_esp32_setup.zip . - + cd ../sd-card/html + zip -r ../../firmware/html-from-11.3.1.zip . + # extract the version used in next step - id: get_version @@ -301,7 +303,9 @@ jobs: name: ${{ steps.get_version.outputs.version-without-v }} body: ${{ steps.extract-release-notes.outputs.release_notes }} files: | - release/* + release/* + firmware/firmware.bin + firmware/html-from-11.3.1.zip # Commit&Push Changelog to master branch. Must be manually merged back to rolling diff --git a/Changelog.md b/Changelog.md index 8127b7ac..4a095d96 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,12 @@ ## [Unreleased] +The release breaks a few things in ota update. So **read the update from version 11.3.1 carefully**. + +1.) You should update to 11.3.1 before you update to this release. All other are not tested. +2.) Upload and update the firmware.bin file from this release. **but do not reboot** +3.) Upload the html-from-11.3.1.zip in html upload and update the web interface. +4.) Now you can reboot. ### Added - automatic release creation @@ -11,6 +17,7 @@ - using the update.zip from release page - status (upload, processing, ...) displayed - auto suggestion for reboot (or not in case of web ui update only) + - Best for OTA use Firefox. Chrome works with warnings. Safari stuck in upload. ### Changed - Integrated version info better into the html (main page, logfile) @@ -25,7 +32,7 @@ ### Removed - Remove `/firmware` from GitHub. - - If you want to get the latest firmware and html files, please download from the automated (build action)[https://github.com/jomjol/AI-on-the-edge-device/actions] or (release page)[https://github.com/jomjol/AI-on-the-edge-device/releases] + - If you want to get the latest firmware and html files, please download from the automated [build action](https://github.com/jomjol/AI-on-the-edge-device/actions) or [release page](https://github.com/jomjol/AI-on-the-edge-device/releases) ## [11.3.1] - (2022-09-17) Intermediate Digits diff --git a/sd-card/html/ota_page.html b/sd-card/html/ota_page.html index 3eba6566..f1a6f356 100644 --- a/sd-card/html/ota_page.html +++ b/sd-card/html/ota_page.html @@ -168,6 +168,8 @@ function upload() { alert("No file selected!"); } else if (filePath.length == 0) { alert("File path on server is not set!"); + } else if (filePath.length > 100) { + alert("Filename is to long! Max 100 characters."); } else if (filePath.indexOf(' ') >= 0) { alert("File path on server cannot have spaces!"); } else if (filePath[filePath.length-1] == '/') { @@ -199,35 +201,36 @@ function upload() { xhttp.open("POST", upload_path, false); document.getElementById("status").innerText = "Status: uploading"; xhttp.send(file); + + + document.getElementById("status").innerText = "Status: processing on ESP32"; + + var xhttp = new XMLHttpRequest(); + /* first delete the old firmware */ + xhttp.onreadystatechange = function() { + if (xhttp.readyState == 4) { + if (xhttp.status == 200) { + if (xhttp.responseText.startsWith("reboot")) + { + doReboot(); + } + else + { + alert("Processing done!\n\n" + xhttp.responseText); + } + } else if (xhttp.status == 0) { + alert("Server closed the connection abruptly!"); + UpdatePage(); + } else { + alert(xhttp.status + " Error!\n" + xhttp.responseText); + UpdatePage(); + } + } + }; + var _toDo = basepath + "/ota?task=update&file=" + filePath; + xhttp.open("GET", _toDo, false); + xhttp.send(); } - - document.getElementById("status").innerText = "Status: processing on ESP32"; - - var xhttp = new XMLHttpRequest(); - /* first delete the old firmware */ - xhttp.onreadystatechange = function() { - if (xhttp.readyState == 4) { - if (xhttp.status == 200) { - if (xhttp.responseText.startsWith("reboot")) - { - doReboot(); - } - else - { - alert("Processing done!\n\n" + xhttp.responseText); - } - } else if (xhttp.status == 0) { - alert("Server closed the connection abruptly!"); - UpdatePage(); - } else { - alert(xhttp.status + " Error!\n" + xhttp.responseText); - UpdatePage(); - } - } - }; - var _toDo = basepath + "/ota?task=update&file=" + filePath; - xhttp.open("GET", _toDo, false); - xhttp.send(); /* ----------------------------- */ document.getElementById("reboot").disabled = false;