Using BLExplr v1.6.0 to upgrade Bluegiga's BLE112 or BLE113 firmware over the air (OTA)

Hello everyone,

Bluegiga has released another SDK which supports OTA firmware upgrades. In v 1.2.2 of their SDK Bluegiga optimised the OTA procedure so I just digged into the Application Note “Implementing OTA Firmware upgrade”. After some issues on iOS and not knowing exactly how to deal with the “write without response” characteristics, I implemented the procedure which was only available on the BLEGUI2 app which is part of the SDK in BLExplr v1.6.0.

Yes, you can now upgrade the firmware of a BLE112 or BLE113 module using an iOS device.

First of all, I would recommend anybody who is interested in OTA upgrading the firmware of a BLE112 or BLE113 to read the Application Note : Implementing OTA Firmware Upgrade provided on Bluegiga’s website. In this application note (Page 13) they are mentioning, that since February 2014 Development Kits which are being shipped include a small carrier board with the Winbond flash memory which is required for the OTA procedure. I don’t have such a carrier board, but I created one of my own, which is doing the same (I think). It is a small add on board which can be attached to a BLE112 Evaluation board or the BLE113 Development board.

Since I own both the BLE112 and the BLE113 Eval-/Development board, I created two of these add on modules which can be attached to their headers. The the picture below showing both boards with the add on module attached.

Now that the hardware is extended to provide the SPI Flash chip, necessary for the OTA upgrade of the BLE112 or BLE113 I’ll describe the procedure to upgrade their firmwares using BLExplr v1.6.0 and higher (BLExplr v1.6.0 was not available while writing this blog post. It is submitted to the Apple App Store and is hopefully available by the end of March 2014).

Before you can upgrade a BLE112 or BLE113 OTA, you have to make sure that a firmware is installed which supports the OTA Service defined by Bluegiga. The easier would be to flash the “ota” sample firmware located in the folder “C:\Bluegiga\ble-1.2.2-100\example\ota” (once you installed the latest SDK). I simply flashed this firmware to my BLE112 Development board. I changed the firmware to reflash by changing the name to “Bluegiga OTA 112 MK” So you will see the change after the firmware is flashed.

Before we can flash anything we need the ota files on the iOS device where BLExplr is running. After you started BLExplr v1.6.0 and open the side bar menu you might have noticed that there is a new menu item called  “OTA Firmware Files” as illustrated in the pictures below. As shown in the picture on the right, there are not ota files available yet. But you can easily import them from E-Mail attachments.

I prepated an E-Mail containing four ota file attachments.

  • BLE113.ota (the original BLE113 firmware)
  • BLE113-MK.ota (the firmware changed to use a different text as friendly name)
  • BLE112.ota (the original BLE112 firmware)
  • BLE112-MK.ota (the firmware changed to use a different text as friendly name)

As you can see the attachments are automatically mapped to BLExplr. Tap on a file to import it to BLExplr. BLE112-MK.ota will be fine for the test.

Make sure to go to the settings view and update the 3rd party UUID descriptions. This is necessary to make BLExplr correctly recognize the OTA Service. The next step is to discover peripherals and make sure that the “Bluegiga OTA 112” peripheral is found as illustrated in the screenshot below:

Select the Bluegiga OTA 112 peripheral and make BLExplr connect to it:

Select the Bluegiga OTA Service and you will see, that BLExlpr is not showing the characteristics but a special rendering of the service, where you can select an OTA file you previously imported to the app from an E-Mail:

Now you are ready to rock 🙂 You have selected on ota file and the button “Start OTA Firmware Upgrade” is enabled now.

If you select the button, the OTA procedure will start. You can see the upload progress since BLExplr will show you a progress HUD. The process will take about 60-70 seconds. After that the BLE112 will disconnect the connection to BLExplr.

Now please rediscover for BLE peripherals. Since iOS is buffering the names of the peripherals there is a mismatch between the names as shown in the below screenshot.

Thanks for reading,

Michael.