Skip to content

Commit a2c7959

Browse files
Adding "Uploading OTA file to the net" section to the tutorial.
1 parent 68da785 commit a2c7959

File tree

1 file changed

+14
-4
lines changed
  • content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update

1 file changed

+14
-4
lines changed

content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Convert your encoded file into `.ota` format
139139
You can use `OTA_Usage_Portenta.ino.PORTENTA_H7_M7` as a sketch name for facilitated identification of the file. After this, you will have the `.ota` file of the sketch that you will use with the OTA process.
140140

141141
### Installing Python 3 on Ubuntu and the necessary modules
142-
If you recently installed Ubuntu maybe you can't run the **bin2ota.py** script. This may be because you need to install [Python 3](https://phoenixnap.com/kb/how-to-install-python-3-ubuntu). To do it execute the next command on Ubuntu´s terminal:
142+
If you recently installed Ubuntu maybe you can't run the **bin2ota.py** script. This may be because you need to install [Python 3](https://phoenixnap.com/kb/how-to-install-python-3-ubuntu). To do it execute the next command on **Ubuntu´s terminal**:
143143

144144
```cpp
145145
sudo apt install python-is-python3
@@ -158,18 +158,28 @@ sudo apt install python3-pip
158158
//Necessary to run the script:
159159
pip install crccheck
160160
```
161-
Once you have done it, you should be able to run the bin2ota.py script successfully.
161+
Once you have done it, you should be able to run the bin2ota.py script successfully.
162162

163-
Now you have to upload the .OTA file to a network reachable location, e.g. *OTA_Usage_Portenta.ino.PORTENTA_H7_M7.ota* has been uploaded to:
163+
### Uploading OTA file to the net ###
164+
165+
Now you can upload your .OTA file to an online reachable location, e.g. *OTA_Usage_Portenta.ino.PORTENTA_H7_M7.ota* has been uploaded to:
164166

165167
http://downloads.arduino.cc/ota/OTA_Usage_Portenta.ino.PORTENTA_H7_M7.ota
166168

167-
You can change the file location on the code by modifying the next line:
169+
You can change the default file location on the code by modifying the next line on the ***"OTA_Qspi_Flash"** sketch or in the **"OTA_SD_Portenta"** sketch depending on which method are you going to follow:
168170

169171
```cpp
170172
static char const OTA_FILE_LOCATION[] = "Introduce here your online OTA file location";
171173

172174
```
175+
It is important to know that if your OTA file is uploaded to an HTTPS website you will need to modify the next line in the code:
176+
177+
```cpp
178+
int const ota_download = ota.download(OTA_FILE_LOCATION, true /* is_https */);
179+
```
180+
This line is in **line 87** for the **"OTA_Qspi_Flash"** sketch or in **line 88** on the **"OTA_SD_Portenta"** sketch.
181+
182+
If you are going to use the example OTA file used in this tutorial you don't need to follow the steps in this section, just execute the sketch with the default file location.
173183

174184
<br>
175185

0 commit comments

Comments
 (0)