Giga OTA via IoT Cloud

Hello -

I'm having some trouble understanding the capabilities of the Giga R1. I have added the device to the IoT Cloud, have associated a thing, and have uploaded a sketch via COM port with no issues. The thing is then manipulatable via dashboard. (Everything seems to be connected and communicating with no issues)

When attempting to update the sketch over-the-air, it fails every time. The error message provides no useful information, typically just stating 'Error: Uploading sketchname'.

This article does not list the Giga R1 as an OTA compatible device, but it does list the Portenta H7. To my understanding the Portenta has identical hardware to the Giga. Are OTA updates supported for the Giga? Any way to work around if not?

Note that I also have a Nano IOT and OTA updates work perfectly with the same exact sketch.

Thanks!

Hi, there is a similar post to this, please try the solution shared here.

Thanks for sharing that post. It seems to confirm that the Giga can be updated OTA, but it isn't clear if OTA updates are available directly through the IoT Cloud platform. Do you know if that is possible?

Hi @bryons OTA updates are available for GIGA using ArduinoIotCloud

and a cloud entry plan Arduino Cloud - Plans

When I try to update the Giga OTA in the Arduino IoT Cloud Editor (where it has a Thing running an LED switch), it acts like it can upload but when I actually try, it fails and returns Error Code -3 (amongst others) with no info. Also posting the code to see if maybe I'm doing something wrong there.

Other errors include: "Unable to verify OTA: the board didn't answer after reboot"

#include "arduino_secrets.h"
#include <ArduinoOTA.h>

//#include <OTAUpdate.h>
#include <ArduinoIoTCloud.h>
#include "Arduino_Portenta_OTA.h"

#include "thingProperties.h"

int LED = LED_BUILTIN;

void setup() {
  pinMode(LED, OUTPUT);
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1501); 

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  // Your code here 
  delay(500);
  Serial.println("I'm here!");
}


void onLedSwitchChange() {
  // Do something
  if(led_switch){
    digitalWrite(LED, LOW);
  }
  else{
    digitalWrite(LED, HIGH);
  }
}

@bryons Error code -3 is defined here: https://github.com/arduino-libraries/Arduino_Portenta_OTA/blob/49f839aa75c9359e8ec85016b21b2b04ad175e68/src/Arduino_Portenta_OTA.h#L82

The error means there is some issue with your QSPI flash, you can try the following steps:

And then retry an OTA.

You don't need to include Arduino_Portenta_OTA.h in your sketch this is done automatically by adding ArduinoIoTCloud. Also remove ArduinoOTA.h.

I cannot see any cloud variable used in your sketch, make sure to add at least one cloud variable otherwise OTA will not work.

When using the QSPIFlash sketch, it's not possible to select Partition Scheme 1 and FatFS it seems. Scheme 2 is seemingly what allows you to select FS system. So I don't know what your intention was there.

After doing Partition Scheme 1 and running the WiFiFirmwareUpdater sketch, I tried the OTA update and it worked! Thanks a ton @pennam!

oh yes, using partition scheme 1 fatFS is the default and is not possible to change. Sorry for that :wink:

Happy that is working now!