AsyncTelegram2
AsyncTelegram2 copied to clipboard
OTA update with ESP32
I will be happy if you can an example to update FW to esp32 OTA via telegram bot Thank you!
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
Ok, now the same examples con compile with both ESP32 and ESP8266 MCUs
https://github.com/cotestatnt/AsyncTelegram2/tree/master/examples/ESP_OTA
@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
.
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 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?
@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
@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