OTA with SFU does not work in my Portenta C33

I am trying to run the example SFU OTAUpdate.ino, but I get an Invalid Partition (BD_ERROR_INVALID_PARTITION = -3102) when it gets to execute the line if (err = fs.mount(&mbr) != 0). I tried everything. Any help is welcome

Hi @marc029 . Looking at the code it seems to operate similar to the GIGA R1. I suspect the OTA partition hasn't been created on the QSPI Flash. Run the QSPIReadPartitions example sketch to check. If it hasn't been created then the QSPIFormat example can do this for you.

Hi, many thanks. That did fix the issue, now I can mount it. I am stuck now with downloading in SFU. It seems SFI tries to download the http://downloads.arduino.cc/ota/OTAUsage.ino.PORTENTA_C33.ota file, but only gets 127 bytes and not sure it is writing, although it says it downloaded the filed correctly and there's no error. I will need to debug in detail to see what is going on.

sounds like a 'file not found'. try pasting that link in your browser. This one does work http://downloads.arduino.cc/ota/OTA_Usage_Portenta.ino.PORTENTA_H7_M7.ota in the browser

Hi,

thanks. Same result:

download: Length of OTA binary according to HTTP header = 167 bytes
download: 167 bytes received

I'd bet that there's something weird in the SFU library

For some strange reason, if a wait for some seconds after beginning ethernet and before SFU.update(), then the file is downloading successfully. So it had nothing to do with the SFU itself. Thanks. It is already fixed.