OTA update spiffs
OTA update spiffs
Is there some way to OTA update spiffs partition?
Re: OTA update spiffs
Of course, it should be quite simple.chegewara wrote:Is there some way to OTA update spiffs partition?
Use the OTA example as the base and esp_partition API to erase/write the partition.
- Put your spiffs image file on some http server.
- First find your spiffs partition using esp_partition_find(), get the start address and size.
- Erase the whole partition using esp_partition_erase_range().
- Download the chunks of spiffs image file and write to the partition using esp_partition_write().
- You can optionally use md5 checksum file to validate the written data (use md5 API and esp_partition_read().
Re: OTA update spiffs
Did you try your solution in code? AFAIK, OTA uses partition type APP, Spiffs ueses type Data. Would it works too?loboris wrote:Of course, it should be quite simple.chegewara wrote:Is there some way to OTA update spiffs partition?
Use the OTA example as the base and esp_partition API to erase/write the partition.
- Put your spiffs image file on some http server.
- First find your spiffs partition using esp_partition_find(), get the start address and size.
- Erase the whole partition using esp_partition_erase_range().
- Download the chunks of spiffs image file and write to the partition using esp_partition_write().
- You can optionally use md5 checksum file to validate the written data (use md5 API and esp_partition_read().
Cheers
Su
Re: OTA update spiffs
That is why he said use esp_partition_write instead of esp_ota_write, etc...
Re: OTA update spiffs
Nice, If I get chance to try this out in code. I'll be back.WiFive wrote:That is why he said use esp_partition_write instead of esp_ota_write, etc...
Cheers
Gfast2
Re: OTA update spiffs
Have you done it? Could you share code if possible?
Re: OTA update spiffs
Anyone else had luck updating SPIFFS via OTA? I cant seem to find much information on it...
How hard is it to have the ESP32 download a compressed SPIFFS image via OTA, and then unpack it and write it into SPIFFS? Im using a 16MB flash unit, and downloading/writing a full uncompressed 11MB bin will take quite a while...
How hard is it to have the ESP32 download a compressed SPIFFS image via OTA, and then unpack it and write it into SPIFFS? Im using a 16MB flash unit, and downloading/writing a full uncompressed 11MB bin will take quite a while...
- AndyFreund
- Posts: 2
- Joined: Sun Apr 26, 2020 7:16 am
Re: OTA update spiffs
I used this tool https://github.com/chrisjoyce911/esp32FOTA with success in my application.
It works well with an esp32 for OTA-update of firmware as well as for a SPIFFS partition update.
espFOTA.cpp includes update.h
To start an update they use.
If you use you update OTA partitions.
If you use you update an data spiffs partition.
Contact me, if you need more information.
It works well with an esp32 for OTA-update of firmware as well as for a SPIFFS partition update.
espFOTA.cpp includes update.h
To start an update they use
Code: Select all
bool canBegin = Update.begin(contentLength);
If you use
Code: Select all
bool canBegin = Update.begin(contentLength, U_FLASH);
If you use
Code: Select all
bool canBegin = Update.begin(contentLength, U_SPIFFS);
Contact me, if you need more information.
-
- Posts: 1
- Joined: Fri Oct 30, 2020 9:04 pm
Re: OTA update spiffs
I will contact you after seeing your post on "Re: OTA update spiffs."
Currently working on several project with ESP32. So, please let us know if we have any problem about the OTA Processor via SPIFFS.
- Flash Size : 4Mb(32MB)
- Partition Scheme : No OTA (2MB APP/2MB SPIFFS)
- Size of APP Binary : 1.5 MB
1. App binary file copy to SPIFFS via UART
2. Update.begin(contentLength, U_SPIFFS);
3. Update.write("Apps.bin", size);
4. Update.end();
5. Rebooting...
Thanks CK
Currently working on several project with ESP32. So, please let us know if we have any problem about the OTA Processor via SPIFFS.
- Flash Size : 4Mb(32MB)
- Partition Scheme : No OTA (2MB APP/2MB SPIFFS)
- Size of APP Binary : 1.5 MB
1. App binary file copy to SPIFFS via UART
2. Update.begin(contentLength, U_SPIFFS);
3. Update.write("Apps.bin", size);
4. Update.end();
5. Rebooting...
Thanks CK
Re: OTA update spiffs
Hello, you may find a repository to do OTA update spiffs with code for Arduino IDE here:
https://github.com/pedros89/ESP32-OTA-u ... th-Arduino
https://github.com/pedros89/ESP32-OTA-u ... th-Arduino
Who is online
Users browsing this forum: axellin and 114 guests