ESP32 update bin file

ESP32 with A7670E modem downloads the bin file from FTP max. in 1024 byte packets. I solved the download, I can read all the packets on the UART, so I have the entire bin file at my disposal.
How can I write to the SPIFFS file system and how can I run it? I can still enter it in SPIFFS if I know where to enter it. But I don't know...
I need some help.

Thanks : Smiki

ESP32. I have the bin file at my disposal. Where should I write the packages of the bin file parts in the SPIFFS file system? How can I run the bin file after entering it?
Is there an OTA routine that can be used to specify the packages of the bin file parts? (If there is, the OTA would handle the remaining processes.)

Smiki

Hi @smiki0000 ,

Welcome to the forum..

You need to use the Update lib..

no need for temporary storage, the lib takes care of that..

I used it in here..

good luck.. ~q

Thank you for your help!
Unfortunately, I don't have the complete bin file.
I always only have the currently downloaded package (from FTP with modem) available to me (max. 1024 ... 4096 bytes). This should be entered in the appropriate partition of SPIFFS in the appropriate place, in such 1024..4096 byte packages.
In the example recommended by you (which I thank again), the bin file is handled in one pass by specifying the entire length.
If the Update process is just that I enter the bin file in the appropriate partition of SPIFFS in the appropriate place, and then start/run it, I could do that.
My suspicion is that this is not the only update process...

Smiki

Not sure I understand..
I have 3 functions..
OTA begin, just does an Update.begin(firmware size)
OTA chunk is where the incoming chunks of data are added Update.write(data, chunk size)
OTA end calls Update.end(true) which should complete the update, then I reboot..
you could download and save it to a file but don't need too..

~q

Thank you!
That's how I understand it...
I thought that the "Update.write(data, chunk size)" routine should always specify the full size of the bin file.
"Eureka!"

I will try...

Smiki

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.