hello
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)
@maxgerhardt
a very big thank you to you for your really very clear and detailed answer I will see that
thanks again
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
I did not find information on this subject I found configuration already made but I would prefer to know how to change my values myself and what its values correspond to in memory
Can you upload a PIO project with which the problem can be reproduced? If I don’t see an error message or the code thaht fails it’s really hard to give advice on what might be wrong.
@maxgerhardt
HTTP_UPDATE_FAILD Error (-100): To less space
I just use the sketch ESP32httpUpdate.h
whether on the Arduino IDE or platformIO the problem is the same.
I have no problem with all my other ESP8266
the problem concerns only my ESP32
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
@maxgerhardt
Hello
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