Portenta H7 - Unable to verify OTA: the board didn’t answer after reboot

I'm using Portenta Machine Control, and can't do an update through OTA!
Portenta is connected with Ethernet kabel on fix ip and IOT is working and updating.

I went through everything of post Portenta H7 - Unable to verify OTA: the board didn't answer after reboot - #3 by pennam.

Still, when i try, i received the same error.

Has anyone an idea what is wrong?

hi @cdekimpe
can you share the serial monitor output during the OTA process with debug enabled?

Thanks

hi Pennam,
I'm using the online full editor to send .
how set i

 define DEBUG_VERBOSE(fmt, ...) //Debug.print(DBG_VERBOSE, fmt, ## __VA_ARGS__)

in the online version?

hi @cdekimpe,
you can import this library, that as debug enabled, in your web editor. You need only to download as zip file from github and import it in the library section, custom tab, of the editor.

hi Pennam,

this is what i see.

ArduinoIoTCloudTCP::onOTARequest _ota_url = https://api2.arduino.cc/iot/ota/68d682c6-ec2e-4abe-be98-942d5cfafd92

Arduino_Portenta_OTA_QSPI::download(https://api2.arduino.cc/iot/ota/68d682c6-ec2e-4abe-be98-942d5cfafd92) returns 490747

Hi @cdekimpe did you also set setDebugMessageLevel(DBG_VERBOSE); in your setup function? the debug message about decompression is missing, but no error is occurring board side so i think this is a timeout error. At one point after

Arduino_Portenta_OTA_QSPI::download(https://api2.arduino.cc/iot/ota/68d682c6-ec2e-4abe-be98-942d5cfafd92) returns 490747

the board should reset itself to apply the update. What is the Serial Monitor output after the reset?

You can also try to add a Serial.println("OTA Done"); in your loop() so you can actually check in the SerialMonitor if your application has been updated.

Hi Pennam,

The update came through, but it takes a lot of time to get to that reset. Resulting in this error.
I do see that the loop() stops immediately when the data comes in, but the Thread continues to run. Is this the problem that it takes so long to reset?

Hi @cdekimpe,
we need to find a way to understand if the board has been updated correctly or not. This error means that the board cannot reconnect to the cloud after the update, but it looks to me that the board firmware gets correctly updatated.

What is the output of the SerialMonitor after the board reset?
can you share the sketch of your updated application?

i've made a quick test with my portenta connected through ethernet and everything worked smoothly. I'm quite sure your issue is inside the sketch you are trying to upload with the OTA.

Hi @Pennam,

The restart of the board happens when after the time-out and error on the editor .
So the editor never see the restart.
But now i see in the SerialMonitor, the update is done and correct.
I included the current sketch. (sorry, it is a trail and testing different way to work)
test_netwerk_portenta_dec13a.zip (29,9 KB)

I have two portenta and both doing the same.
One is connected through Wi-Fi the other is wired to network.

Hi @cdekimpe would you try a simple OTA sketch with just a Serial.print();

Something like this:

#include "thingProperties.h"

int message_delay = 0;

void setup() {
  // 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(1500); 

  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection, false, "mqtts-sa.iot.oniudra.cc");
  
  /*
     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 
  if(millis() - message_delay > 1000) {
    Serial.println("OTA Done");
    message_delay = millis();
  }
}