Do I have write custom boot loader for this.
I think i need two different application.
one application which on boot reads sd card to check any .bin file exits then perform OTA process and delete .bin. This application reside in one parition. It will have small size.
Second application is complete application with large size which will be running the main application.
Can you make flash two different application on esp32 in different partition using command line.
I guess full application will reside at factory or OTA_0 first partition.
smaller application will reside at OTA_1 (second partition)
Correct me if I am wrong.
What is the purpose of two OTA partition?
Re: What is the purpose of two OTA partition?
Yes.I think i need two different application.
one application which on boot reads sd card to check any .bin file exits then perform OTA process and delete .bin. This application reside in one parition. It will have small size.
Second application is complete application with large size which will be running the main application.
I think its possible, at least i can do it with esp32 flash download tool.Can you make flash two different application on esp32 in different partition using command line.
Depends on your needs(chose). Im not sure if its possible to write to factory partition from application and how hard it is, maybe Angus can help here.I guess full application will reside at factory or OTA_0 first partition.
smaller application will reside at OTA_1 (second partition)
PS maybe i will try this option when i end up with current ota project (ota update triggered with mqtt request, plus many other mqtt options)
Re: What is the purpose of two OTA partition?
Hi,
Did you try out with single OTA?
Can I use single partition. Write bin to my SD card file and on startup application apply OTA update to OTA_0.
My custom partition is
nvs,data,nvs,0x9000,16K,
otadata,data,ota,0xd000,8K,
phy_init,data,phy,0xf000,4K,
ota_0,app,ota_0,0x10000,1856K,
ota_1,app,ota_1,0x1e0000,1856K,
storage,data,fat,0x3b0000,128K,
Do I need (two OTA) or (one Factory + single OTA). which method is better .
Do we need otadata and phy_init partitions or they can be optional.
If we see my total allocation is few hundred kb less than 4MB. Can I increase my OTA_0 and OTA_1 more. I did try, but no success.
Can some one reply please. we need to make decision about our partition. as i understand once you release your product with device. you cannot change partition via OTA.
Can some ones answer my questions please.
Thanks,
Naeem
Did you try out with single OTA?
Can I use single partition. Write bin to my SD card file and on startup application apply OTA update to OTA_0.
My custom partition is
nvs,data,nvs,0x9000,16K,
otadata,data,ota,0xd000,8K,
phy_init,data,phy,0xf000,4K,
ota_0,app,ota_0,0x10000,1856K,
ota_1,app,ota_1,0x1e0000,1856K,
storage,data,fat,0x3b0000,128K,
Do I need (two OTA) or (one Factory + single OTA). which method is better .
Do we need otadata and phy_init partitions or they can be optional.
If we see my total allocation is few hundred kb less than 4MB. Can I increase my OTA_0 and OTA_1 more. I did try, but no success.
Can some one reply please. we need to make decision about our partition. as i understand once you release your product with device. you cannot change partition via OTA.
Can some ones answer my questions please.
Thanks,
Naeem
Last edited by snahmad75 on Fri Nov 30, 2018 4:58 pm, edited 1 time in total.
Re: What is the purpose of two OTA partition?
chegewara wrote: ↑Thu May 10, 2018 7:38 pmYou cant write to partition you are running from, so you need at least 2 partitions:
- 2x OTA
- factory + OTA
But now when you asking this question i have idea. Maybe, but just maybe, it is possible to write ota.bin image to sd card, then reboot esp32. Now, when bootloader find ota.bin file on SD card then perform ota update, delete image from sd card, restart esp32. Even if this is not possible then you can have similar procedure on factory partition. This way you can have two options to ota update, from sd card or from internet. Im assuming that ota update procedure from sd card requires minimum partition size, far less than your regular application.
Is this possible. Have anyone try it using only 1x OTA with sd card.
Re: What is the purpose of two OTA partition?
Now I am getting failure after increase my NVS size with signed bins.
Check this out.
viewtopic.php?p=34714#p34714
Check this out.
viewtopic.php?p=34714#p34714
Re: What is the purpose of two OTA partition?
You cant do it, because you cant overwrite active (currently running partition). What will happen when you overwrite part of code you are running and is responsible for performing ota update? Think.
Re: What is the purpose of two OTA partition?
ok. make sense.
Re: What is the purpose of two OTA partition?
The running partition would not be the application to update, but the partition where the boot loader is stored.You cant do it, because you cant overwrite active (currently running partition)
From my point of view, this should work :
- Download a new fw from Internet to the SDCard from the main app.
- Press reset, system always boot from OTA partition where a simple SD card reader/writer is implemented
- OTA partition checks if new binary file is present on the SDcard
- If so, it read all binary from SD and write to Main partition (which is not running)
- If no firmware is available on the SD, it jumps to Main app vector.
Why this would not work ?
Who is online
Users browsing this forum: MichaelS and 108 guests