Asset OTA

Since 5.5.0:

Asset OTA (available in Device OS 5.5.0 and later), makes it easy to include bundled assets that can be delivered to other processors and components in your system, such as:

  • Coprocessors
  • Graphics and fonts for external displays
  • Sound samples for device with audio output capabilities

Including assets is as easy as including an directory in your project, specifying it in the and building and flashing using Particle Workbench, the Particle CLI, or fleet-wide OTA for a product. Bundled assets can be up to 1 MB to 1.5 MB in size, after compression, depending on the platform, and do not use additional data operations.

The compression algorithm is similar to gzip, so using a gzip program on the assets folder on your computer will yield the approximate size after compression.

In addition to the methods in the System class, including System.onAssetOta() and System.assetsHandled(), the functions is this section are used to process the asset bundles.

For complete code examples, see asset-ota-examples in the Particle Github repository.

For information on building a binary with assets using the Particle CLI, see Compiling a directory with assets. This method also works for the Particle: Cloud Compile and Particle: Cloud Flash options in Particle Workbench.

void handleAssets(spark::Vector<ApplicationAsset> assets) 
  for (ApplicationAsset& asset: assets) {
    // Process each asset here