I noticed a problem when creating my spiffs.bin binary file, it is always the same size whatever its content its size is always the same 1.5M
therefore impossible to do a remote update with a spiffs.bin file
when i open the spiffs.bin file it is actually write half written the other half and clearly readable
so it didn’t properly create
what I do not understand because when I charge it in USB it works very well
would you have an idea to correct this problem ?
thank you in advance !
sorry if my english is not correct thank you google translate lol
It is correct that the file size is always constant. It gets padded with filler values. Similiar question was already asked before: ESP8266 SIFFS.bin file to large. For ESP 32, it’s the same, see code.
The size of the SPIFFS file is is chosen by the selected partition table, as documented. The default SPIFFS size is 0x170000 bytes aka crica 1.5MB.
What exact error is occuring? SPIFFS upload shoult still be perfectly fine with OTA upload selected upload_protocol = espota and friends, docs)
a very big thank you to you for your really very clear and detailed answer I will see that
for the OTA update I do not do it from IDE but from an HTTP server so if the SPIFFS.bin file is not correct necessarily that it does not work
my binary file and on the github the ESP32 will search for it to do its OTA update
I left the link at the top of the page you can see my binary export file from platfomio
so I managed to do what it takes for my partition I chose the file near configured 8M
board_build.partitions = default_8MB.csv
on the other hand I did not understand how to solve the problem SPIFFS.bin it is still incorrect
Why are you using an 8MB partition table if a WeMos D1 mini 32 only has 4 MB flash?
Also, since you mentioned using ESP32httpUpdate.h which seems to come from this library they are recommending the official, integrated OTA way as well and say the project is deprecated.
The error To less space / HTTP_UE_TOO_LESS_SPACE seems to be coming from here:
So it checks whether the available bytes in the SPIFFS partition is at least as big as the downlaoded file. Then however updating it with a full SPIFFS.bin partition file which will always be bigger than free space in the SPIFFS partition due to overhead makes no sense… It seems to be expecting differently formated update files, though it doesn’t say how to create those. This is also noted in SPIFFS mounting issue · Issue #2 · suculent/esp32-http-update · GitHub.
Backtracking through the code the update from the TCP stream happens here which just calls into the Updater class which in the SPIFFS case just writes it directly into flash.
So my best advices would be:
remove the length check in the if(spiffs) code section
I do have a wemos32 I changed the flash memory to 8M
I saw this error but I tested by removing it does not change anything but it is because I did not organize the spiff space well now it all works thanks to you thank you very much
I use this library because it is very simple to use more it is very light unlike other libraries which take more memory
Thank you for your help, it was really useful! A big thank you to you