AsyncTelegram2 icon indicating copy to clipboard operation
AsyncTelegram2 copied to clipboard

OTA update with ESP32

Open joroMaser opened this issue 2 years ago • 7 comments

I will be happy if you can an example to update FW to esp32 OTA via telegram bot Thank you!

joroMaser avatar Apr 28 '22 18:04 joroMaser

Here you can find what you are asking for. The example are written for esp8266 only, but with some small edits (like in others examples) can run also with ESP32

https://github.com/cotestatnt/AsyncTelegram2/tree/master/examples/ESP8266

cotestatnt avatar Apr 29 '22 05:04 cotestatnt

Ok, now the same examples con compile with both ESP32 and ESP8266 MCUs

https://github.com/cotestatnt/AsyncTelegram2/tree/master/examples/ESP_OTA

cotestatnt avatar Apr 29 '22 09:04 cotestatnt

@cotestatnt thank you so much. I will try and update you ASAP. I saw in your new example that for esp8266 you use WiFiClientSecure while in another example you used BearSSL::WiFiClientSecure client.

joroMaser avatar Apr 29 '22 14:04 joroMaser

It's the same. Since some releases ago, the default client with esp8266 is BearSSL so it's not needed anymore to write explicity.

cotestatnt avatar Apr 29 '22 14:04 cotestatnt

@cotestatnt maybe it's more good to disable /remove "FLASH" button after use used thus button Otherwise it user press few time on this button,error will appear

By the way , lot of time I got File is unavailable. Maybe size limit 20MB was reached or file deleted and when I tried to send firmware.bin again it's work, why?

joroMaser avatar May 05 '22 20:05 joroMaser

@cotestatnt I think there is an error on OTA with esp32 I send firmware.bin and click FLASH .. . I saw Serial logs and when I saw Updating 491520 of 892912 bytes... that stay there and not continue.

I test it lot of time and it's usually happend (each time on another bytes...) when the firmware sent from telegram web and I click FLASH in telegram web

joroMaser avatar May 06 '22 13:05 joroMaser

@cotestatnt I have same issue on update OTA on ESP32, and this fix works on my ESP32 board,

https://github.com/cotestatnt/AsyncTelegram2/pull/131

secmask avatar Nov 03 '23 04:11 secmask