cancel
Showing results for 
Search instead for 
Did you mean: 

Management of OTA download of a corrupted binary in an STM32WB BLE application

SDi B.2
Associate II

Hi,

I am currently working on a bluetooth application, on an STM32WB55 microcontroller, to which I have integrated OTA update functionality.

As Loader I used the one present in the provided code examples.

The application and downloads work properly, my question is: what happens if the binary file I transmit is corrupted?

At the moment I have run some tests. However, if I manipulate the binary file by going to delete parts or overwriting others, the trend may change. There are cases where after downloading it remains in the OTA loader and others where the firmware is loaded but the application crashes not allowing the binary to be reloaded.

So in the loader present in the examples I think that in addition to the key check there is no check on the validity of the received binary, is there?

In that sense how could one proceed? By inserting an additional check in the loader (e.g., CRC) or has some other functionality been provided?

Thank you very much

1 ACCEPTED SOLUTION

Accepted Solutions
Remy ISSALYS
ST Employee

Hello,

Indeed in BLE_Ota example provided in STM32CubeWB package, there is only a check to verify if the full firmware has been written. Of course, you can add an additional check like CRC. For example, you can replace the magic keyword by the CRC in your binary.

I think you can also look the Secure boot & secure firmware update software expansion for STM32Cube available here:

https://www.st.com/en/embedded-software/x-cube-sbsfu.html

Best Regards

View solution in original post

1 REPLY 1
Remy ISSALYS
ST Employee

Hello,

Indeed in BLE_Ota example provided in STM32CubeWB package, there is only a check to verify if the full firmware has been written. Of course, you can add an additional check like CRC. For example, you can replace the magic keyword by the CRC in your binary.

I think you can also look the Secure boot & secure firmware update software expansion for STM32Cube available here:

https://www.st.com/en/embedded-software/x-cube-sbsfu.html

Best Regards