This is a tutorial on how to perform a Device Firmware Upgrade (DFU) with Bluetooth over-the-air (OTA) upgrade. The OTA upgrade follows the Silicon Labs OTA procedure that is described in application note AN1086. Most of the example applications provided in the Bluetooth SDK already have OTA support built into the code. In these examples, the DFU mode is triggered through the Silicon Labs OTA service that is included as part of the application’s GATT database. This can be checked and added in the BLE GATT Configurator in Simplicity Studio.
For demonstration purposes, we are going to upgrade the SoC - Empty SDK example application to the SoC - Smart Phone App example application. This allows us to easily verify that the functionality of the user application has changed as the smartphone example has the Health Thermometer service and uses the LCD for visual feedback.
You will need:
Wireless Starter Kit and Bluetooth capable radio board
Build the SoC - Smart Phone App project and run create_bl_files.bat/sh script from the smartphone project tree. This creates a folder named output_gbl under your project. There are three .gbl upgrade image files in this folder:
application.gbl: user application (including full Bluetooth stack)
apploader.gbl: AppLoader (including minimal Bluetooth stack)
full.gbl: For UART DFU, not needed in this example. Starting from SDK 2.7.0, the user application also includes the Bluetooth stack and therefore the Bluetooth stack can be updated without full update. Full update is needed only if the AppLoader needs to be updated. See AN1086 for more details.
Transfer the .gbl files to your smartphone for the mobile app to find.
Android users can use any transfer method e.g. Dropbox. Android users need to navigate to SiliconLabs_BGApp/OTAFiles directory in their phone's file system and create a new subfolder for storing the .gbl files. This is where the Blue Gecko App can find them.
iOS users can upload the files to iCloud. The app will prompt you to bring the files from iCloud.
Launch the Blue Gecko mobile app.
In the Blue Gecko App
Once in the app,
Go to Bluetooth Browser and find and connect to your kit (default name "Empty Example").
Open the pop-up menu in the upper right corner and select OTA.
Select Partial OTA and look for your newly created folder in the Folder dropdown menu. iOS users can select from iCloud at this stage.
Once you have selected the folder, you can select your .gbl image from the App dropdown. Use the application.gbl image.
Finally, press OTA and your upgrade should start.
After the OTA process has finished, verify that the kit is now running the SoC - Smart Phone App example. You can find the kit in the Bluetooth Browser with a new name like "BGXXXXX". The name is also shown on the LCD.
Note:
To enable Bluetooth OTA upgrade, the target device must be programmed with Gecko Bootloader that is configured as Internal Storage Bootloader. This is an application bootloader and it requires that the new firmware image acquisition is managed by application. Running the "Demos" in Simplicity Studio will include the bootloader and user application. However, flashing a "Software Example" does not. If your OTA upload stops at 0 % and you get a message on Android saying "GATT CMD STARTED", then that might indicate a missing or incorrect bootloader. In this case do the following:
Go to New Project -> Gecko Bootloader -> Gecko Bootloader 1.5.0 and create that for your kit. Remember to choose the "Internal Storage Bootloader" option suitable for your storage size.
In the .isc-file for the bootloader project, you can configure some options, but for this example, you can just press Generate with the default settings.
Build the project and find the folder in your bootloader project tree that is named “GNU ARM <compiler version number> - Default”. Flash the "xxx-combined.s37"-file to the device. This includes the first stage and main bootloaders.
Now you can proceed with flashing the SoC - Empty -project as in First steps #3
After doing all steps, I select "/exampleOTAfolder" in which I have confirmed the existance of "application.gbl" but blue gecko app does not show me gbl files for choosing one, so I can't select the file. Is there any App bug ?
Thank you.
0
@Asier Can you upload the screenshots of the app and the folder from a file browser?
0
Sure, here we have.
The problem I have is that after selecting folder "/ Subfolder" in my case, App does not let me select any file.
I touch with my finger over the "App:" fiel but it does not show me any file list. Simply it does nothing when touching.
Hey, thanks for the screenshots, the file structure appears to be correct. Which Android OS are you using on the phone?
0
Hello, my phone is a Samsung Galaxy S4 (GT-I9505) with android version 5.0.1.
0
Can you try reinstalling the Blue Gecko App and see if it happens again. I can see what probably looks like "Low storage memory" notification. Can you free up some space before reinstalling the app.
0
I free up some memory space and that way notification dissapears. Then I reinstall the Blue Gecko App but the same is happened. Any other indication ?
Thank you
0
It's hard to say with the app. One suggestion is to use a different phone or if you have 2 or more kits, you can try OTA using the PC.
0
I wanted to know how to do a full update using the Blue Gecko app.
The partial update I did was successful but I am not sure how to do a full update.
I have transferred 3 files to the folder: application.gbl, apploader.gbl, and full.gbl
the app asks for
folder:
App:
Stack:
I am using the EFR32BG13P632F512GM48 chip, bootloader-storage-internal-ble, and a bluetooth mesh application(node unprovisioned, unprovisioned beaconing)
Thanks,
Russ Everett
0
App: application.gbl
Stack: apploader.gbl
The full.gbl can be used when you do OTA via the DFU method as mentioned in section 5 of AN1045. The process goes from being 2 steps to 1 step but a majority of times you only want to update the application.
Correction: The full.gbl can be used when you update the firmware via the DFU method as shown in section 2.4 of AN1086. It cannot be used for OTA.
KBA_BT_0801: Using Blue Gecko app OTA
Introduction
This is a tutorial on how to perform a Device Firmware Upgrade (DFU) with Bluetooth over-the-air (OTA) upgrade. The OTA upgrade follows the Silicon Labs OTA procedure that is described in application note AN1086. Most of the example applications provided in the Bluetooth SDK already have OTA support built into the code. In these examples, the DFU mode is triggered through the Silicon Labs OTA service that is included as part of the application’s GATT database. This can be checked and added in the BLE GATT Configurator in Simplicity Studio.
For demonstration purposes, we are going to upgrade the SoC - Empty SDK example application to the SoC - Smart Phone App example application. This allows us to easily verify that the functionality of the user application has changed as the smartphone example has the Health Thermometer service and uses the LCD for visual feedback.
You will need:
First steps
In the Blue Gecko App
Once in the app,
After the OTA process has finished, verify that the kit is now running the SoC - Smart Phone App example. You can find the kit in the Bluetooth Browser with a new name like "BGXXXXX". The name is also shown on the LCD.
Note:
To enable Bluetooth OTA upgrade, the target device must be programmed with Gecko Bootloader that is configured as Internal Storage Bootloader. This is an application bootloader and it requires that the new firmware image acquisition is managed by application. Running the "Demos" in Simplicity Studio will include the bootloader and user application. However, flashing a "Software Example" does not. If your OTA upload stops at 0 % and you get a message on Android saying "GATT CMD STARTED", then that might indicate a missing or incorrect bootloader. In this case do the following:
For more information
AN1086: Using the Gecko Bootloader with the Silicon Labs Bluetooth® Applications
UG266: Silicon Labs Gecko Bootloader User's Guide
After doing all steps, I select "/exampleOTAfolder" in which I have confirmed the existance of "application.gbl" but blue gecko app does not show me gbl files for choosing one, so I can't select the file. Is there any App bug ?
Thank you.
Sure, here we have.
The problem I have is that after selecting folder "/ Subfolder" in my case, App does not let me select any file.
I touch with my finger over the "App:" fiel but it does not show me any file list. Simply it does nothing when touching.
Regards.
I free up some memory space and that way notification dissapears. Then I reinstall the Blue Gecko App but the same is happened. Any other indication ?
Thank you
I wanted to know how to do a full update using the Blue Gecko app.
The partial update I did was successful but I am not sure how to do a full update.
I have transferred 3 files to the folder: application.gbl, apploader.gbl, and full.gbl
the app asks for
folder:
App:
Stack:
I am using the EFR32BG13P632F512GM48 chip, bootloader-storage-internal-ble, and a bluetooth mesh application(node unprovisioned, unprovisioned beaconing)
Thanks,
Russ Everett
App: application.gbl
Stack: apploader.gbl
The full.gbl can be used when you do OTA via the DFU method as mentioned in section 5 of AN1045. The process goes from being 2 steps to 1 step but a majority of times you only want to update the application.
Correction: The full.gbl can be used when you update the firmware via the DFU method as shown in section 2.4 of AN1086. It cannot be used for OTA.