Upload a sketch to the giga via wifi

Hi all,

Is it possible to upload a sketch to the giga via its onboard wifi (kinda OTA)?

thanks for any help!

yes. with Arduino IoT Cloud or by doing it as the Cloud.
Giga is a big version of Portenta H7 so same solutions apply

Thanks for that!

I am more into independent update like used with ArduinoOTA. i use it with ESP32-Wroom and its great. i was wondering if it works on the Giga as well...

thanks for that.

The best way is to test that in person...bought a couple of boards and will start the investigation process...

Hi, you finally found a solution, because I'm racking my brains but I still haven't managed it

Hi, I use this GitHub - arduino-libraries/Arduino_Portenta_OTA: OTA on the Arduino Portenta. to download from my own file server.

Hi, I'm also interested and working on a way to upload sketches for the GIGA R1. It seems there is no Wifi OTA libary working yet for Arduino. I trying to work with another wireless seriell solution. I have 2 Avisaro WLAN modules, so can connect two Arduino's via RX/TX and send/receive signals. And I've two USB/Serial converter. Unfortunately they do not work as expected. So, I'm not ready yet. However, I'm always interested to programm the GIGA wireless.

I used the instructions here and it works

https://support.arduino.cc/hc/en-us/articles/12370721200540-Configure-GIGA-R1-WiFi-Portenta-H7-and-Portenta-Machine-Control-for-Over-The-Air-OTA-uploads

Thanks for your input. I did the procedure but I'm not sure whether it works. Can you help further with an basic exemple script like attached ? So far, I can only use OTA for ESP8266 etc.


```cpp
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>

#ifndef STASSID
#define STASSID "xxxxxxxxxxxx"
#define STAPSK  "xxxxxxxxxxxx"
#endif

const char* ssid = STASSID;
const char* password = STAPSK;

void setup() {
  Serial.begin(115200);
  Serial.println("Booting");
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  while (WiFi.waitForConnectResult() != WL_CONNECTED) {
    Serial.println("Connection Failed! Rebooting...");
    delay(5000);
    ESP.restart();
  }

 

  ArduinoOTA.onStart([]() {
    String type;
    if (ArduinoOTA.getCommand() == U_FLASH) {
      type = "sketch";
    } else { // U_SPIFFS
      type = "filesystem";
    }

    // NOTE: if updating SPIFFS this would be the place to unmount SPIFFS using SPIFFS.end()
    Serial.println("Start updating " + type);
  });
  ArduinoOTA.onEnd([]() {
    Serial.println("\nEnd");
  });
  ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
    Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
  });
  ArduinoOTA.onError([](ota_error_t error) {
    Serial.printf("Error[%u]: ", error);
    if (error == OTA_AUTH_ERROR) {
      Serial.println("Auth Failed");
    } else if (error == OTA_BEGIN_ERROR) {
      Serial.println("Begin Failed");
    } else if (error == OTA_CONNECT_ERROR) {
      Serial.println("Connect Failed");
    } else if (error == OTA_RECEIVE_ERROR) {
      Serial.println("Receive Failed");
    } else if (error == OTA_END_ERROR) {
      Serial.println("End Failed");
    }
  });
  ArduinoOTA.begin();
  Serial.println("Ready");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
}

void loop() {
  ArduinoOTA.handle();
}

Thanks, however it did not work for me, until I added delay(1000) after the Serial.begin(115200) loop.

1 Like