Module Integration Guides
Arduino

Integrate Over the Air Updates

5min

OTA update has become a critical requirement for devices being deployed remotely. This guide covers everything you need to know about Over the Air Firmware Upgrades with BytebeamArduino.

Enabling OTA updates

OTA updates can be integrated into application by adding a single line of code!

C++


Have a look at BasicOTA sketch for Wifi based OTA and BasicOTA_GSM sketch if you are using a GSM Modem for connectivity

Follow the below steps to trigger OTA updates:

  • Upload a .bin file and create a new firmware version on Bytebeam as per the instructions mentioned in the Creating a new Firmware Version guide.
  • Once, new firmware version is created, trigger OTA update as per the instructions mentioned in the Triggering OTA update guide.
  • Progress of the firmware update can be monitored on Bytebeam platform using Action status.

Disabling OTA updates

If your device does not require OTA updates you can disable them. If you opt for the No OTA partition scheme, make sure you have the selected file system partition (say SPIFFS) for device provisioning. See Tools > Partition Scheme within the Arduino IDE.

Document image


Disabling OTA updates at Run Time

You can use the disableOTA method to disable the OTA updates at any point of time in the code:

C++


Disable OTA updates at Compile Time

This approach will disable the OTA updates by excluding the OTA related stuff from the build thereby saving some flash size. Follow the below steps to do so:

  • Open the Arduino libraries location.
  • Step into BytebeamArduino\src folder.
  • Open BytebeamArduino.h in your favourite text editor.
  • Set BYTEBEAM_OTA_ENABLE macro to false.