Gecko Bootloader can load application images into the application area from different sources.
What it cannot do is uploading the application image to a temporary storage slot of the internal/external flash before loading it from there into the application area. This article helps you implement the missing step: uploading the image to the internal/external flash via a Bluetooth connection.
This article guides you through how to upload images to storage slots using the standard OTA DFU process (used by the OTA Apploader). To learn how to load the uploaded images from the slots into the application area please read this article: https://www.silabs.com/community/wireless/bluetooth/knowledge-base.entry.html/2017/07/19/switching_betweenfi-GnNI
To make the OTA uploader compatible with Silicon Labs Bluetooth OTA Apploader that loads the image directly to the application area, first we have to understand how the standard OTA DFU method works.
The standard OTA DFU sequence (implemented in the OTA Apploader) looks like this:
The OTA uploader uses a similar process:
The attached code implements image uploading to the slots using the standard OTA process. It is also extended with the possibility to select a slot to upload to, and to select a slot to boot from. You are free to modify this example according to your needs.
To create a project with multislot OTA DFU follow these steps:
//case gecko_evt_gatt_server_user_write_request_id: // ... //break;
(Note: setting gecko_bootloader=true in the .isc file will copy btl_interface.c and btl_interface_storage.c into your project again. Remove the instances you copied before to avoid duplicated definitions)
I get an error "GATT:BUSY" when I try to do the OTA part.
What could be the problem?
I followed all the steps in this tutorial.
GATT:BUSY is error code 0x84 which corresponds to OTA_EraseError in the provided example. It means that your storage wasn't erased properly. Please check your Slot settings, maybe it points to some invalid or read-only memory space. Or you have set a non-existent slot to be erased via the upload_slot characteristic.
I have followed all the steps mentioned above (used with BTMesh SDK and Blue Gecko board) and I am getting Error 133 (0x85): GATT ERROR
I have generated GATT service for OTA using BTMesh SDK. First time the Blue gecko board got connected with "BlueGecko App" and have copied OTA files as well in the mobile App storage but before OTA get started, App got crashed. Right now, I am facing issue while connecting Blue gecko board with Android App. I have tested it with "BlueGecko App" it is showing "connection timeout".
Also, I have tried with another Blue Gecko module and didn't changed anything in soc-btmesh-empty code (just to verify the connection with the App), only dumped boot loader code and then application code in the module, but it didn't work, getting same error with connection establishment.
Sorry for the late response. This solution was not tested with BT mesh SDK, so I cannot guarantee it works.
The provided code have error codes between 0x81-0x84. Getting error code 0x85 suggests that you still use the appLoader to upload the image. Did you remove the default event handler for gecko_evt_gatt_server_user_write_request_id?