Page 1 of 2

custom bootloader to update main firmware/application

Posted: Sun Mar 25, 2018 1:10 pm
by snahmad75
Hi,

Can you someone tell me how to write custom bootloader to upgrade/downgrade current main application after release to customers in the field.

Can we do via custom bootloader via serial or over wifi using ftp?

Thanks,
Naeem

Re: custom bootloader to update main firmware/application

Posted: Sun Mar 25, 2018 4:35 pm
by kolban
Naeem,
I think this is likely to be too broad a question. Perhaps you could describe in a lot more detail what your goal is, what you have studied (eg. OTA and esptool) and what your current design thinking looks like?

Re: custom bootloader to update main firmware/application

Posted: Sun Mar 25, 2018 8:32 pm
by WiFive

Re: custom bootloader to update main firmware/application

Posted: Wed Apr 18, 2018 4:32 pm
by snahmad75
Referring to this web page.

http://esp-idf.readthedocs.io/en/latest ... ption.html

I need to encrypt my binary .bin file and upload via serial/UART pragmatically using C/C++.

Once upload and running. I guess I can use OTA via WIFI update firmware the encrypted bin image over ftps.
Any example code will be helpful.

I guess I don't need to write custom bootloader. kindly confirm it.


Thanks,
Naeem

Re: custom bootloader to update main firmware/application

Posted: Thu Apr 19, 2018 8:58 am
by snahmad75
Waiting for reply.

Re: custom bootloader to update main firmware/application

Posted: Thu Apr 19, 2018 9:13 am
by WiFive
Yes. There are lots of ota examples on GitHub from espressif and others.

Re: custom bootloader to update main firmware/application

Posted: Thu Apr 19, 2018 9:24 am
by snahmad75
Hi,

I saw only one example.

https://github.com/espressif/esp-idf/tr ... system/ota

Are there any more?. send me web links.


Thanks,
Naeem

Re: custom bootloader to update main firmware/application

Posted: Thu Apr 19, 2018 10:01 am
by WiFive

Re: custom bootloader to update main firmware/application

Posted: Thu Apr 19, 2018 10:09 am
by snahmad75
I need to support upgrade/downgrade my encrypted firmware via OTA over wifi using Https.
First update firmware with .bin file and we have some web files( .html, .js. css etc) to get from Http server host these files. We need to grab these files one by one and put into out Flash FATFs drive on ESP32.

Does this sound good idea. In this way I can avoid using FTP. using HTTP get method only.

Thanks,
Naeem

Re: custom bootloader to update main firmware/application

Posted: Thu Apr 19, 2018 2:00 pm
by kolban
My understanding is that the ESP32 OTA APIs don't care how the new image is retrieved... only that it be presented to the OTA APIs piece by piece until completed. Whether you use HTTP GET to retrieve it, FTP Client or a raw socket ... it shouldn't matter.

With regard to the files that are needed for the application ... I'm thinking outloud here ... but could they not be included in the .bin file? Are all the files written to as well as read from? If you have read-only files, I have to believe that there is going to be a mechanism to include them in the .bin.