custom bootloader to update main firmware/application

snahmad75
Posts: 356
Joined: Wed Jan 24, 2018 6:32 pm

custom bootloader to update main firmware/application

Postby snahmad75 » Sun Mar 25, 2018 1:10 pm

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

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: custom bootloader to update main firmware/application

Postby kolban » Sun Mar 25, 2018 4:35 pm

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?
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32


snahmad75
Posts: 356
Joined: Wed Jan 24, 2018 6:32 pm

Re: custom bootloader to update main firmware/application

Postby snahmad75 » Wed Apr 18, 2018 4:32 pm

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

snahmad75
Posts: 356
Joined: Wed Jan 24, 2018 6:32 pm

Re: custom bootloader to update main firmware/application

Postby snahmad75 » Thu Apr 19, 2018 8:58 am

Waiting for reply.

WiFive
Posts: 2088
Joined: Tue Dec 01, 2015 7:35 am

Re: custom bootloader to update main firmware/application

Postby WiFive » Thu Apr 19, 2018 9:13 am

Yes. There are lots of ota examples on GitHub from espressif and others.

snahmad75
Posts: 356
Joined: Wed Jan 24, 2018 6:32 pm

Re: custom bootloader to update main firmware/application

Postby snahmad75 » Thu Apr 19, 2018 9:24 am

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


snahmad75
Posts: 356
Joined: Wed Jan 24, 2018 6:32 pm

Re: custom bootloader to update main firmware/application

Postby snahmad75 » Thu Apr 19, 2018 10:09 am

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

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: custom bootloader to update main firmware/application

Postby kolban » Thu Apr 19, 2018 2:00 pm

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: Baidu [Spider], filipESP and 11 guests