arduino / ArduinoCore-samd

Arduino Core for SAMD21 CPU
GNU Lesser General Public License v2.1
475 stars 722 forks source link

regression: OTA updates no longer working on Wifi1010 & SAMD M0 release 1.8.8 #563

Closed Tdegussem closed 4 years ago

Tdegussem commented 4 years ago

When trying to do an Over-the-Air update on a maker board (Wifi1010), the board hangs after OTA flashing:

ArduinoOTA example, do ethernet port upload using OTA 1.8.8:

I can reproduce this by up- or downgrading the board definition version.

JAndrassy commented 4 years ago

additional information. the cause is mkrwifi1010.arduinoota.extraflags=-d in boards.txt

this is for the 'new' OTA. does it work? is it documented?

facchinm commented 4 years ago

Hi @jandrassy , the -d flag was meant to allow offloading the download to Nina module (https://github.com/arduino/arduinoOTA/blob/master/main.go#L39) . The problem is that, for security reasons, the second stage bootloader now requires an image with a particular header, so passing the raw binary will not work. @aentinger should we revert the -d or adapt arduinoota to create and serve the correct binary?

JAndrassy commented 4 years ago

@facchinm Martino, right now here the problem is a conflict with the WIFi101OTA library. Until the new OTA download is ready and documented there shouldn't be the mkrwifi1010.arduinoota.extraflags=-d line in boards.txt.

It looks like the file is downloaded by firmware from arduinoOTA server at the same time as it is uploaded by arduinoOTA to WiFi101OTA server. But I don't know yet why it is a problem.

aentinger commented 4 years ago

Hi :wave: I've got next to no idea (really no idea actually) how OTA via IDE works. However, here are the tools to prefix the binary with the required data. I should note however that those requires using ArduinoCore-samd:master:HEAD since there's been no release since the latest changes to SNU. What's the fastest strategy to get to a fix here?

JAndrassy commented 4 years ago

that was fast :-). thank you

aentinger commented 4 years ago

Yeah @jandrassy ... a release was already in the air :cloud_with_lightning: :wink: