OTA update both esp32 and a slave MCU attached via UART

panda1001
Posts: 2
Joined: Wed Apr 08, 2020 4:04 pm

OTA update both esp32 and a slave MCU attached via UART

Postby panda1001 » Wed Apr 08, 2020 4:18 pm

hi, first post on these forums but ive used them time and time again when i have had queries or needed guidance and guidence is really what i need right now.

im currently working on a project that involves using a esp32 to do some light calculations but mainly itll be used for communicating over wifi to a network/ through to a database, and a PSoc 6 to do other functionality. both are currently connected over UART.

ive got the esp32 OTA self updating by referencing stored variables on the esp32 against data stored within the database and it does its thing from there, so i know im able to pull the .bin from the server. the part im getting stuck on is how to pull/ store and then distribute a .bin file over UART to the PSoc (what the PSoc does with the file isnt relevant to me right now, i mainly need the esp to be able to transfer the file over)

any help would be greatly appreciated

ESP_Sprite
Posts: 9040
Joined: Thu Nov 26, 2015 4:08 am

Re: OTA update both esp32 and a slave MCU attached via UART

Postby ESP_Sprite » Thu Apr 09, 2020 5:21 am

Two options. Either you package the PSOC binary in the firmware itself (e.g. using https://docs.espressif.com/projects/esp ... inary-data) or you serve the PSOC file separately and use a httpclient to fetch it from the server; you can probably just hardcode the URL to this in your ESP32 binary.

panda1001
Posts: 2
Joined: Wed Apr 08, 2020 4:04 pm

Re: OTA update both esp32 and a slave MCU attached via UART

Postby panda1001 » Thu Apr 09, 2020 7:42 am

thanks for the quick reply, ill have a look into the packaging the PSOC binary into the esp fw

for the second option ive already got the esp to pull both its own firmware and the psoc firmware from the server itself, its transferring the psoc fw over uart that im struggling with, ive looked into using esp link and esp wifi-serial bridge but again im not sure how id go about transfering the PSOC fw .bin in its enterity over to the PSOC. ive seen some stuff online about using x/ymodem on the esp but again its something im trying to look into

ESP_Sprite
Posts: 9040
Joined: Thu Nov 26, 2015 4:08 am

Re: OTA update both esp32 and a slave MCU attached via UART

Postby ESP_Sprite » Thu Apr 09, 2020 8:45 am

That is not something ESP-IDF has control over. I'd indeed use a simple protocol like xmodem myself, but there are many, many ways to skin that cat.

Who is online

Users browsing this forum: No registered users and 26 guests