libretiny icon indicating copy to clipboard operation
libretiny copied to clipboard

Configure OTA on wblc5 (BK7231T)

Open raulzanardo opened this issue 1 year ago • 4 comments
trafficstars

How do configure the platformio.ini file to use the OTA upload protocol?

raulzanardo avatar Jul 16 '24 18:07 raulzanardo

You can use the generic-bk7231t-qfn32-tuya board for the WBLC5 board, https://docs.libretiny.eu/boards/generic-bk7231t-qfn32-tuya/

Cossid avatar Jul 16 '24 18:07 Cossid

Ok, but how do configure the upload protocol for it to be OTA?

I cant find any documentation about the upload_protocol of the platformio.ini file

raulzanardo avatar Jul 16 '24 18:07 raulzanardo

I don't know that OTA in particular is a part of platformio, as it is more an implementation detail, not low-level.

platformio is expecting UART; https://docs.libretiny.eu/docs/flashing/platformio/#using-ltchiptool-wired-via-uart

I'll defer to @kuba2k2 to expand further.

Cossid avatar Jul 16 '24 19:07 Cossid

If by "OTA" you're referring to the wireless update over Wi-Fi, then no, PlatformIO doesn't have that built-in. In fact, to best of my knowledge, PlatformIO doesn't have that feature on any supported platform.

If you want to upload your firmware via Wi-Fi, you will need to use the Update Arduino library. The library is very similar to ESP32's equivalent, it's meant to be a drop-in replacement. See docs:

  • https://docs.libretiny.eu/ltapi/class_update_class/
  • https://docs.libretiny.eu/ltapi/class_libre_tiny_o_t_a/
  • https://docs.libretiny.eu/docs/dev/lt-api/#ota There are many tutorials online about the Update library, you will definitely also find a way to e.g. pull firmware updates via HTTP.

The upload_protocol is not used and shouldn't be changed - it defaults to uart, no other protocol is currently supported.

kuba2k2 avatar Jul 16 '24 19:07 kuba2k2