Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,50 @@ Convert your encoded file into `.ota` format

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.

### Installing Python 3 On Linux

If you are using Linux, maybe you cannot run the **bin2ota.py** script. This may be because you need to install [Python 3](https://www.python.org/) and the necessary modules. To do it execute the next command on your **Linux terminal**:

```cpp
sudo apt install python-is-python3
``````

You will also need to install the **crccheck** module on python by following the next instructions:

Installing pip on python:
```cpp
//Necessary to install python modules:
sudo apt install python3-pip
```
Installing the crccheck necessary module on python:

```cpp
//Necessary to run the script:
pip install crccheck
```
Once you have done it, you should be able to run the bin2ota.py script successfully.

### Uploading OTA file to the net ###

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:

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

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:

```cpp
static char const OTA_FILE_LOCATION[] = "Introduce here your online OTA file location";
```
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:

```cpp
int const ota_download = ota.download(OTA_FILE_LOCATION, true /* is_https */);
```
This line is in **line 87** for the **"OTA_Qspi_Flash"** sketch or in **line 88** on the **"OTA_SD_Portenta"** sketch.

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.


***Now you have two options to choose, use QSPI or use an SD Card to storage your OTA file. You can use the left side index to jump to the option that you may need.***

### QSPI Storage Mode
Expand Down