6.3.7.1 BLE OTA DFU Demo Step-by-Step Process

To successfully upgrade the device firmware over Bluetooth® LE, follow this detailed step-by-step process. This section includes everything from preparing the firmware image to verifying the update on the target device, ensuring a smooth and reliable OTA DFU experience.
  1. To perform the OTAU, you must store the upgradable firmware bin file created in Upgradable Image (.bin) File Generation in the MBD application. For more details, see Upgradable Image (.bin) File Generation from Related Links.
  2. Send the upgradable bin file to the mobile device via email.
  3. Save the firmware image received via email into the MBD application.
    1. On iOS® mobile, perform the following steps:
      1. Open the email application and locate the email containing the .bin file attachment.
      2. Tap on the .bin file attachment to preview it.
        Figure 6-88. Email Attachment OTA Package (.bin) File – iOS® Mobile
      3. Tap the Share icon (usually a square with an arrow pointing up).
        Figure 6-89. Sharing (.bin) File
      4. In the share sheet, select Save to Files (with a folder icon).
        Figure 6-90. Save to Files – iOS® Mobile
      5. In the next window, locate and tap the MBD application icon.
      6. Tap the Save button at the top right to confirm.
        Figure 6-91. Saving the File to MBD Application – iOS® Mobile
      7. The MBD application will import the .bin file and make it available for OTA DFU.
    2. On Android® mobile, perform the following steps:
      1. Open the email application and locate the email containing the .bin file attachment.
      2. Tap on the .bin file attachment to download it.
        Figure 6-92. Email Attachment OTA Package (.bin) File – Android® Mobile
      3. After downloading, tap the file and select “Open with” or “Share.”
      4. Choose the Microchip Bluetooth Data (MBD) application from the list of available applications.
        Figure 6-93. Open (.bin) File with MBD Application
      5. The MBD application will import the .bin file and make it available for OTA DFU.
        Figure 6-94. Saving the File to MBD Application – Android® Mobile
  4. Open the MBD application on the mobile device.
    Important: Turn ON Bluetooth® on the mobile device.
  5. Select the OTA DFU tab in the MBD application.
    Figure 6-95. Selecting OTA DFU
  6. Power on the OTA-capable target device (PIC32WM-BW1 Curiosity Board) after programming it using Programming the Current Application Image using MPLAB® X IDE. For more details, see Programming the Current Application Image using MPLAB® X IDE from Related Links.
  7. The PIC32WM-BW1 Curiosity Board starts advertising over BLE.
  8. In the MBD application, tap the SCAN button.
    Figure 6-96. Scanning OTA Devices List
  9. The target device appears in the scanned list as “BLE_SENSOR_[last_4_digits_of_MAC]”. Select the intended device from the scanned list. When prompted to pair the device, click on Pair or Yes.

    Note: The MBD application connects to the OTA target device, and a “Connected” message appears briefly.
    Figure 6-97. Pair Bluetooth® Device
  10. Tap the Select Image option to choose the available firmware file in the MBD application.
    Figure 6-98. Select Image (.bin) File
  11. The screen displays the OTAU firmware image file that is copied in steps (1 and 2).
    1. Tap on the image to select it.
    Figure 6-99. Selecting (.bin) File from Steps (1 and 2)
  12. Confirm the firmware version and tap the OK button.
    Figure 6-100. Firmware Confirmation
  13. This action initiates the firmware update, and the MBD application displays the progress. The process takes a few seconds to complete.
    Figure 6-101. Device Firmware Version Update in Progress
  14. After the image transfer is complete, the MBD application displays an OTA update successfully message. Tap OK in the MBD application to continue.
    Figure 6-102. OTA Update Successful Message
    1. The device starts performing the authentication of the new image.
      Figure 6-103. OTA Firmware Validation
  15. If validation is successful, the system reboots automatically. On boot-up, the device authenticates the new image in slot 1 and then copies the new image to slot 0. The new image now runs from slot 0.
  16. To verify whether the running image on the target is the newly upgraded image, repeat steps 4 to 9 and check the current version displayed in the MBD application.