From 77001e0690fa809a50bc3cc9a32c9dba4207b6b7 Mon Sep 17 00:00:00 2001 From: Jorge Trujillo Date: Mon, 13 Feb 2023 13:42:07 +0100 Subject: [PATCH 01/10] Adding important information about installing Python 3 on Ubuntu and the necessary modules to run the necessary script bin2ota.py --- .../tutorials/over-the-air-update/content.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md index 8cffa6d751..925e6e0c4d 100644 --- a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md +++ b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md @@ -138,6 +138,30 @@ 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 Ubuntu and the necessary modules +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: + +```cpp +sudo apt install python-is-python3 +`````` + +You will also need to install the **crccheck** module on python by following the next instructions: + +1. Installing pip on python: +```cpp +//Neccesary to installpython modules: +sudo apt install python3-pip +``` +2. 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. + +
+ ***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 From 7a10b3146a993f7c10524236b7547c626605a01c Mon Sep 17 00:00:00 2001 From: Jorge Trujillo Date: Mon, 13 Feb 2023 15:45:44 +0100 Subject: [PATCH 02/10] Some lines explaining the possibility to modify the .OTA file location on the tutorial. --- .../tutorials/over-the-air-update/content.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md index 925e6e0c4d..9c84d9159d 100644 --- a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md +++ b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md @@ -160,6 +160,17 @@ pip install crccheck ``` Once you have done it, you should be able to run the bin2ota.py script successfully. +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: + +http://downloads.arduino.cc/ota/OTA_Usage_Portenta.ino.PORTENTA_H7_M7.ota + +You can change the file location on the code by modifying the next line: + +```cpp +static char const OTA_FILE_LOCATION[] = "Introduce here your online OTA 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.*** From 2fa45e7e61d1b288f9a246573d5ff0859425fa5d Mon Sep 17 00:00:00 2001 From: Jorge Trujillo Date: Tue, 14 Feb 2023 16:13:33 +0100 Subject: [PATCH 03/10] Adding "Uploading OTA file to the net" section to the tutorial. --- .../tutorials/over-the-air-update/content.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md index 9c84d9159d..2fe675d021 100644 --- a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md +++ b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md @@ -139,7 +139,7 @@ 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 Ubuntu and the necessary modules -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: +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**: ```cpp sudo apt install python-is-python3 @@ -158,18 +158,28 @@ sudo apt install python3-pip //Necessary to run the script: pip install crccheck ``` -Once you have done it, you should be able to run the bin2ota.py script successfully. +Once you have done it, you should be able to run the bin2ota.py script successfully. -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: +### 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 file location on the code by modifying the next line: +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.
From 27408123f94b6fbcbb6671051b0700f3778c1c2d Mon Sep 17 00:00:00 2001 From: Jorge Trujillo Date: Tue, 14 Feb 2023 16:43:56 +0100 Subject: [PATCH 04/10] Fix title cases --- .../portenta-h7/tutorials/over-the-air-update/content.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md index 2fe675d021..3db54860da 100644 --- a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md +++ b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md @@ -138,8 +138,9 @@ 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 Ubuntu and the necessary modules -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**: +### Installing Python 3 On Ubuntu + +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) and the necessary modules. To do it execute the next command on **Ubuntu´s terminal**: ```cpp sudo apt install python-is-python3 From f1dc9790444d79a3c7f8206e9a6f2328461a329a Mon Sep 17 00:00:00 2001 From: Jorge Trujillo Date: Tue, 14 Feb 2023 16:48:20 +0100 Subject: [PATCH 05/10] Correcting a comment --- .../boards/portenta-h7/tutorials/over-the-air-update/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md index 3db54860da..ed1d73aeb4 100644 --- a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md +++ b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md @@ -150,7 +150,7 @@ You will also need to install the **crccheck** module on python by following the 1. Installing pip on python: ```cpp -//Neccesary to installpython modules: +//Necessary to installpython modules: sudo apt install python3-pip ``` 2. Installing the crccheck necessary module on python: From 80e691e05b2f5a0e2eb1a61b5dbf70f5a5686b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Trujillo=20Rom=C3=A1n?= <124149761+Jorgetrujilloroman@users.noreply.github.com> Date: Mon, 6 Mar 2023 10:43:25 +0100 Subject: [PATCH 06/10] Update content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julián Caro Linares --- .../boards/portenta-h7/tutorials/over-the-air-update/content.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md index ed1d73aeb4..46bca70e16 100644 --- a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md +++ b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md @@ -182,7 +182,6 @@ This line is in **line 87** for the **"OTA_Qspi_Flash"** sketch or in **line 88* 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.*** From 8035168af78ffb83e25ff6080748dd3d22681e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Trujillo=20Rom=C3=A1n?= <124149761+Jorgetrujilloroman@users.noreply.github.com> Date: Mon, 6 Mar 2023 11:32:11 +0100 Subject: [PATCH 07/10] Update content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julián Caro Linares --- .../boards/portenta-h7/tutorials/over-the-air-update/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md index 46bca70e16..95a2fc6952 100644 --- a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md +++ b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md @@ -138,7 +138,7 @@ 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 Ubuntu +### Installing Python 3 On Linux 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) and the necessary modules. To do it execute the next command on **Ubuntu´s terminal**: From 8d1330480a5664bc25424fe7e31088a880cb5868 Mon Sep 17 00:00:00 2001 From: Jorge Trujillo Date: Mon, 6 Mar 2023 11:51:11 +0100 Subject: [PATCH 08/10] [PC-1116] Mentioning Linux instead Ubuntu Some changes on the document referencing Linux instead of Ubuntu. --- .../tutorials/over-the-air-update/content.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md index 95a2fc6952..5ec812b2aa 100644 --- a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md +++ b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md @@ -139,8 +139,9 @@ 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 +### Installing Python 3 On Linux -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) and the necessary modules. To do it execute the next command on **Ubuntu´s terminal**: +If you recently installed a Linux distribution, maybe you can't 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 @@ -148,12 +149,12 @@ sudo apt install python-is-python3 You will also need to install the **crccheck** module on python by following the next instructions: -1. Installing pip on python: +Installing pip on python: ```cpp -//Necessary to installpython modules: +//Necessary to install python modules: sudo apt install python3-pip ``` -2. Installing the crccheck necessary module on python: +Installing the crccheck necessary module on python: ```cpp //Necessary to run the script: @@ -171,7 +172,6 @@ You can change the default file location on the code by modifying the next line ```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: From 56bdd9d2410759c40bdca2263ad724d384c09b2e Mon Sep 17 00:00:00 2001 From: Jorge Trujillo Date: Mon, 6 Mar 2023 12:10:19 +0100 Subject: [PATCH 09/10] [PC-1116] Small fix Removing duplicated sentence --- .../boards/portenta-h7/tutorials/over-the-air-update/content.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md index 5ec812b2aa..5d91fd7ca1 100644 --- a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md +++ b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md @@ -138,7 +138,6 @@ 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 ### Installing Python 3 On Linux If you recently installed a Linux distribution, maybe you can't 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**: From 8e0603dbac8f2fbd924ed30d60529b96fecaa23c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Trujillo=20Rom=C3=A1n?= <124149761+Jorgetrujilloroman@users.noreply.github.com> Date: Mon, 6 Mar 2023 12:36:43 +0100 Subject: [PATCH 10/10] Update content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julián Caro Linares --- .../boards/portenta-h7/tutorials/over-the-air-update/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md index 5d91fd7ca1..6382a4baac 100644 --- a/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md +++ b/content/hardware/04.pro/boards/portenta-h7/tutorials/over-the-air-update/content.md @@ -140,7 +140,7 @@ You can use `OTA_Usage_Portenta.ino.PORTENTA_H7_M7` as a sketch name for facilit ### Installing Python 3 On Linux -If you recently installed a Linux distribution, maybe you can't 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**: +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