OTA with external reources

orbitcoms
Posts: 149
Joined: Fri Aug 03, 2018 10:08 pm
Location: Sydney, Australia

OTA with external reources

Postby orbitcoms » Sun Jul 30, 2023 6:37 am

Hi,
I have started working on a new project that uses OTA. For the program code this is working fine. It uploads code from the web and runs in new partition.
However, I want to expand the application to include html web files and mp3 files (it is ADF project).

At the moment the html files are in a "web_store" partition in the and mp3 files in "audio" partition.
This works ok if I only want to make changes to the code but if I want to change some of the html elements or mp3 files, what is a good way do this? Like, could I use a rest api to simply get the files and then some function to flash then during run time into the partition?

Thanks

MicroController
Posts: 1708
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: OTA with external reources

Postby MicroController » Sun Jul 30, 2023 10:43 am

You can use SPIFFS or FatFS (with wear levelling) to read and write files from/to flash.

Or use "bare-bones" Partition API to write to a partition.

orbitcoms
Posts: 149
Joined: Fri Aug 03, 2018 10:08 pm
Location: Sydney, Australia

Re: OTA with external reources

Postby orbitcoms » Sun Jul 30, 2023 11:03 am

Thanks for your reply.
So, I can use say api rest method to read file to ram then just save to spiffs as a file and make sure my code retrieves data for html and mp3 from spiffs.

Who is online

Users browsing this forum: Bing [Bot] and 81 guests