Using Simplicity Connect for OTA DFU#

Introduction#

This tutorial explains how to perform a Device Firmware Upgrade (DFU) using a Bluetooth Over-the-Air (OTA) update. You can perform an OTA update on any device that has OTA functionality enabled in its GATT profile.

Most example applications provided with the Bluetooth SDK include OTA support. In these examples, DFU mode is triggered through the Silicon Labs OTA service included in the application's GATT database. You can add OTA functionality to a project by installing the OTA DFU software component.

In this tutorial, you will upgrade the Bluetooth - SoC Blinky SDK example application to the Bluetooth - SoC Interoperability Test example application.

Requirements#

  • Wireless Starter Kit and Bluetooth-capable radio board

  • Simplicity Studio 6

  • Android or iOS mobile device

Applicaiton Setup#

  1. Download Simplicity Connect mobile app (Android / iOS).

  2. Connect the kit to your computer and select it in Simplicity Studio.

  3. Create the Bluetooth - SoC Blinky example project from Simplicity Studio Launcher.

  4. Build the Bluetooth - SoC Blinky project and flash the firmware image to the device.

  5. Create the Bluetooth - SoC Interoperability Test example project.

  6. Build the Bluetooth - SoC Interoperability Test project and double-click the create_bl_files.bat/sh script in the project tree. You may need to define two environment variables, PATH_SCMD and PATH_GCCARM, before running the script. The script creates a folder named output_gbl under your project and six .gbl upgrade image files in this folder:

    • application.gbl: user application (including full Bluetooth stack)

    • application-crc.gbl: user application with a CRC32 checksum

    • apploader.gbl: AppLoader (including minimal Bluetooth stack)

    • apploader-crc.gbl: AppLoader with a CRC32 checksum

    • full.gbl: user application and AppLoader (full update) for UART DFU, not needed in this example.

    • full-crc.gbl: user application and AppLoader (full update) with a CRC32 checksum for UART DFU, not needed in this example.

    A full update is needed only if the AppLoader needs to be updated. See Using the Gecko Bootloader with Silicon Labs Bluetooth Applications for more details.

    output.gbl filesoutput.gbl files

  7. Transfer the .gbl files to your smartphone so the mobile app can find them. You can either transfer them via USB to any folder on your phone or place them in cloud storage that is available from your phone (for example, Google Drive, Dropbox, or iCloud).

  8. Launch the Simplicity Connect mobile app.

Simplicity Connect Mobile App Setup#

After launching the app, perform the following steps:

  1. Go to the Scan tab and find and connect to your kit (default name "Blinky Example").

    OTA popup menuOTA popup menu

  2. Select the OTA Firmware option from the upper-right corner.

    OTA popup menuOTA popup menu OTA popup menuOTA popup menu

  3. Select Partial and look for the GBL file on your smartphone.

  4. Finally, press Upload and your upgrade should start.

    OTA setup viewOTA setup view OTA setup viewOTA setup view OTA setup viewOTA setup view

After the OTA process has finished, verify that the kit is now running the OTA example application. You can find the kit on the Scan page with a new name "OTA" Example.

Bootloader Requirements#

To perform a Bluetooth OTA update, the target device must be programmed with the Gecko Bootloader. The Gecko Bootloader is an application bootloader, which means that the application manages the acquisition of the new firmware image.

Running a demo in Simplicity Studio flashes both the bootloader and user application to the device. However, flashing an example project flashes only the application.

If an OTA update remains at 0% and the Android app displays GATT CMD STARTED, the bootloader might be missing or incorrectly configured. To create and flash a bootloader:

  1. In the Simplicity Studio Launcher, select Create New Project to create a Gecko Bootloader project for your kit. Select the Internal Storage Bootloader example project with a configuration appropriate for the available storage size.

  2. Configure the required options in the <projectname>.isc file. For this example, use the default settings, and then select Generate.

  3. Build the project. Locate the bootloader image in the GNU ARM <compiler version number> - Default build directory:

    • For Series 1 devices, use the <projectname>-combined.s37 file. This file contains the first-stage bootloader and main bootloader with a CRC32 checksum.

    • For Series 2 devices, use the <projectname>-crc.s37 file. This file contains the main bootloader with a CRC32 checksum.

  4. Flash the bootloader image to the device.

Additional Resources#