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.
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 @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
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.
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.
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)
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();
}
}