Skip to content

Commit 2659fe1

Browse files
authored
New article: If you see an error when performing an Over-the-Air (OTA) update [HC-1572] (#393)
* New article: If you see an error when performing an Over-the-Air (OTA) upload * Remove comments * Remove instructions to deactivate watchdog timer Testing found that disabling the watchdog could cause the board to become unresponsive, forcing a manual and physical reboot. * Update content/Arduino Cloud/Cloud Editor/If-you-see-an-error-when-performing-an-Over-the-Air-OTA-upload.md * Improve memory partitioning instructions
1 parent 413c4b8 commit 2659fe1

File tree

3 files changed

+126
-0
lines changed

3 files changed

+126
-0
lines changed
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
---
2+
title: "If you see an error when performing an Over-the-Air (OTA) upload"
3+
id: 15122161765916
4+
---
5+
6+
Learn how to resolve errors when uploading Over-the-Air (OTA) in the Cloud Editor.
7+
8+
Before you proceed, rule out other types of errors:
9+
10+
* If the message on the console panel bar says **"Error Verifying \<Sketch name\>"**, it means that the sketch could not be successfully compiled. See [If your sketch doesn't compile](https://support.arduino.cc/hc/en-us/articles/4402764401554-If-your-sketch-doesn-t-compile) instead.
11+
* An Over-the-Air upload will only be attempted if the ![OTA symbol](img/symbol_ota.png) OTA icon is visible to the right of the Upload button. If USB upload is also available, make sure that the OTA option is selected.
12+
13+
In this article:
14+
15+
* [Identifying the OTA error message](#identify-error)
16+
* [Error reference for OTA uploads](#errors)
17+
18+
---
19+
20+
## Identifying the OTA error message {#identify-error}
21+
22+
When an Over-the-Air upload fails, you can find the error in the console output.
23+
24+
Follow these steps:
25+
26+
1. Find the console panel. If it is hidden, show it by clicking the button in the bottom-right corner.
27+
2. Find the line that starts with "SHA256" or "Board error".
28+
3. Find the instructions for that error in the [error reference](#errors).
29+
30+
<img src="img/ota-error-sha.png" width=800px/>
31+
32+
---
33+
34+
## Error reference for OTA uploads {#errors}
35+
36+
In this section:
37+
38+
* [Board error - errorwriteupdatefilefail](#errorwriteupdatefilefail)
39+
* [Board error - httpresponsefail](#httpresponsefail)
40+
* [Board error - otadownloadfail](#otadownloadfail)
41+
* [Board error - otaheadercrcfail](#otaheadercrcfail)
42+
* [Board error - otastorageinitfail](#otastorageinitfail)
43+
* [Board error - serverconnecterrorfail](#serverconnecterrorfail)
44+
* [SHA256 mismatch - Unable to apply the new firmware. Previous firmware detected after restart](#sha256mismatch)
45+
* [SHA256 Unknown - Unknown Firmware detected after restart.](#sha256unknown)
46+
47+
### Board error - errorwriteupdatefilefail {#errorwriteupdatefilefail}
48+
49+
This error indicates that the device's memory partition table is improperly formatted.
50+
51+
* If you're using **Arduino GIGA R1 WiFi** or **Portenta H7**:
52+
1. Reinitialize the storage with this Sketch: [QSPIFormat.ino](https://github.com/arduino/ArduinoCore-mbed/blob/main/libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino)
53+
1. Reinstall the SSL certificates with this Sketch: [WiFiFirmwareUpdater](https://github.com/arduino/ArduinoCore-mbed/tree/main/libraries/STM32H747_System/examples/WiFiFirmwareUpdater)
54+
55+
* If you're using **Arduino Opta**: Follow [these instructions](https://docs.arduino.cc/tutorials/opta/memory-partitioning/#partitioning-the-memory-of-an-opta).
56+
* If you're using **Portenta Machine Control**: Follow these [instructions](https://docs.arduino.cc/tutorials/opta/memory-partitioning/#partitioning-the-memory-of-a-portenta-machine-control).
57+
58+
> [!TIP]
59+
> If you're using GIGA R1 WiFi, see [Configure GIGA R1 WiFi for Over-The-Air (OTA) uploads](https://support.arduino.cc/hc/en-us/articles/12370721200540-Configure-GIGA-R1-WiFi-for-Over-The-Air-OTA-uploads).
60+
61+
### Board error - httpresponsefail {#httpresponsefail}
62+
63+
This error can occur if the OTA update fails during the firmware download.
64+
65+
Follow these steps:
66+
67+
1. Ensure that the board has a stable connection to Arduino Cloud.
68+
1. Avoid extensive calls to the `delay()` function or other blocking code inside the `loop()` function of your sketch.
69+
70+
### Board error - otadownloadfail {#otadownloadfail}
71+
72+
This error can occur if the OTA update fails during the firmware download.
73+
74+
Follow these steps:
75+
76+
1. Ensure that the board has a stable connection to Arduino Cloud.
77+
1. Avoid extensive calls to the `delay()` function or other blocking code inside the `loop()` function of your sketch.
78+
79+
### Board error - otaheadercrcfail {#otaheadercrcfail}
80+
81+
The header of the downloaded file does not match the expected one, likely indicating that the file was corrupted during the download.
82+
83+
Follow these steps:
84+
85+
1. Try to upload the sketch again.
86+
87+
### Board error - otastorageinitfail {#otastorageinitfail}
88+
89+
This error indicates that the device's memory partition table is improperly formatted.
90+
91+
* If you're using **Arduino GIGA R1 WiFi** or **Portenta H7**:
92+
1. Reinitialize the storage with this Sketch: [QSPIFormat.ino](https://github.com/arduino/ArduinoCore-mbed/blob/main/libraries/STM32H747_System/examples/QSPIFormat/QSPIFormat.ino)
93+
1. Reinstall the SSL certificates with this Sketch: [WiFiFirmwareUpdater](https://github.com/arduino/ArduinoCore-mbed/tree/main/libraries/STM32H747_System/examples/WiFiFirmwareUpdater)
94+
95+
* If you're using **Arduino Opta**: Follow [these instructions](https://docs.arduino.cc/tutorials/opta/memory-partitioning/#partitioning-the-memory-of-an-opta).
96+
* If you're using **Portenta Machine Control**: Follow these [instructions](https://docs.arduino.cc/tutorials/opta/memory-partitioning/#partitioning-the-memory-of-a-portenta-machine-control).
97+
98+
> [!TIP]
99+
> If you're using GIGA R1 WiFi, see [Configure GIGA R1 WiFi for Over-The-Air (OTA) uploads](https://support.arduino.cc/hc/en-us/articles/12370721200540-Configure-GIGA-R1-WiFi-for-Over-The-Air-OTA-uploads).
100+
101+
### Board error - serverconnecterrorfail {#serverconnecterrorfail}
102+
103+
This error occurs when the device fails to connect to the firmware download endpoint.
104+
105+
Follow these steps:
106+
107+
1. Ensure that the board has a stable connection to Arduino Cloud.
108+
109+
### SHA256 mismatch - Unable to apply the new firmware. Previous firmware detected after restart {#sha256mismatch}
110+
111+
This error means that the device restarted with a SHA (fw identifier) that is different from the target one and the SHA is equal to the one installed when the OTA process is started. This usually happens when the device restarts during the OTA process.
112+
113+
Follow these steps:
114+
115+
1. Check if the sketch running on the device is unstable and causes frequent restarts.
116+
117+
### SHA256 Unknown - Unknown Firmware detected after restart. {#sha256unknown}
118+
119+
This error indicates that the device restarted with a new SHA (firmware identifier), which differs from both the target firmware and the original firmware. This suggests that another firmware was flashed on the device via a different method, such as USB, during the OTA update process.
120+
121+
Follow these steps:
122+
123+
1. Ensure there is no external device that is programming the board.
124+
1. Repeat the upload process.
125+
126+
<!-- markdownlint-disable-file HC001 -->
135 KB
Loading
641 Bytes
Loading

0 commit comments

Comments
 (0)