OTA Updates with LVGL and Squareline

Has anyone successfully got OTA updates working to a GigaR1 with Giga Touch Display and a project that is using a UI developed in Squareline Studio?

Presumably I somehow need to add in the files that Squareline produces.

Hi @farmer_giles. There shouldn't be any special considerations for OTA specific to LVGL and SquareLine Studio. The files are only relevant to the sketch compilation process and the compilation process is the same whether you are uploading via the USB interface or OTA.

So if you are able to update when uploading via USB, then you will also be able to update when uploading via OTA. The only difference is which port you select before uploading.

When using OTA, you do need to keep in mind that the OTA capability is part of the sketch program (when using Arduino Cloud IoT, it is provided under the hood by the ArduinoIoTCloud library dependency of the sketch). So if you upload a sketch that does not provide an OTA functionality (e.g., if you uploaded the basic "Blink" example sketch), or if a bug in the sketch interferes with its OTA functionality (e.g., a divide by zero crashes the operating system), then the next attempt to perform an OTA upload will fail because the sketch program running on the board doesn't have the capability to receive the upload. You can always recover the board from this situation by connecting it to the compute with a USB cable and performing an upload of a sketch with working OTA capability, but that might be inconvenient if you don't have easy access to the board. But this is not in any way specific to sketches using LVGL/SquareLine Studio. The same consideration applies to any project using OTA.

Hi Per, thank you! I could not work out how to initiate OTA updates from the IDE (no OTA port listed in the dropdown) but I did manage to do this:

  • install Arduino Cloud CLI 0.3.0
  • from the IDE: Sketch> Export Compiled Binary
  • from the command line I used the CLI to send the compiled binary to the board

Excitingly this worked!

Now I see this at the cloud - yay!

I did do these things too - just in case...

Do you know if it is possible to initiate OTA updates from the IDE? I spent about 20 minutes looking at every possible bit of the IDE but I could not work out if it was possible.

2 Likes

Great work on getting OTA updates working by using Arduino Cloud CLI in tandem with Arduino IDE!

It is not possible to initiate OTA uploads using the system that is used by Arduino Cloud.

Arduino IDE does support OTA uploads using the original system, which is often used with the ESP8266 and ESP32 boards:

https://arduino-esp8266.readthedocs.io/en/latest/ota_updates/readme.html#application-example

https://docs.arduino.cc/tutorials/mkr-1000-wifi/wifi-101-ota/

There is a nice library maintained by a community member that makes it possible to do this with quite a few other boards as well:

It doesn't have explicit support for the GIGA R1 WiFi board, but I think it could be made to work with it. However, since you are already using Arduino Cloud, and since the Arduino Cloud OTA system is more advanced than the original system, I think you are already taking the correct approach.

1 Like