4.2.1.2 Uploading and Creating bin File for PFM OTA DFU

The following BLE OTA demo steps are common for any application implementing OTA functionality.

BLE sensor application is the sample project which implements OTA functioanlity as explained in the above steps. The current image (ble_sensor.X.production.signed.unified_gpiobased.hex or ble_sensor.X.production.signed.unified_timerbased.hex) with OTA capability and new upgradable .bin (ble_sensor_1.0.0.1_enc_ota.bin) is also available in \ble\advanced_applications\ble_sensor\precompiled_hex for your reference.

  • Hardware Requirement:

Tool

Qty

WBZ351 Curiosity Board

1

Micro USB cable

1

Android/iOS Mobile

1

  • Smartphone App: Microchip Bluetooth Data (MBD) iOS/Android app available in stores

  • Demo steps:

    1. To perform the OTAU, the upgradable firmware bin file has to be created and must be stored in the MBD app. To create the upgradable firmware bin file , the following changes in Project Properties must be done after creating the project graph.
      Figure 4-55. Project Properties - Header configuration
      Figure 4-56. Project Properties - OTA configuration

      After the Project Properties configurations, click on Create OTA File. The Upgradable .bin image with selected "Output File Name" will be created in .X folder. This is the image stored in OTAU Manager to send to OTAU Target.

    2. Send the upgrdable bin file to the mail. Refer to the following screenshots to store the image received on mail into MBD app.
      • Android Mobile:
        Download the .bin file that was sent over email
      Downloading the .bin file
      open the downloaded .bin file with MBD
      Save the file in MBD by selecting "SAVE FILE"
    3. Turn on mobile Bluetooth and select “OTA DFU" tab of Microchip Bluetooth Data App on the mobile device.
    4. Power On the OTA capable target device (PIC32CXBZ3/WBZ35) which was programmed in "Programming the Application using MPLABX IDE". Device will be advertising. Click on "SCAN" button in mobile app and the device be visible in scanned list. Click on intended device from the scanned list. Mobile app will now get connected with OTA Target device.
    5. "Connected" message will appear for a short while. Click the ‘Select Image’ option to choose the available firmware file.
    6. The OTAU firmware image file copied in the step 1 will be visible on screen. Click on that image.
    7. After confirming the FW version press OK button.
    8. Firmware update will be initiated and the progress will be shown in mobile app. The process would take few seconds.
    9. Once the complete image is transferred, "OTA Update successfully" status will be shown in mobile app. Click on "OK" and then device will perform authentication of the image. If validation is successful, then system reboot automatically.
    10. On bootup, device does the authentication of new image in Slot1 and then copies the new image to Slot0. Now the new image will be running from Slot0.
    11. To verify whether the running image on the target is newly upgraded image, follow steps 2 to 7 and check the current version.