cancel
Showing results for 
Search instead for 
Did you mean: 

How can I do the FOTA update for the IoT Cloud example on STM32 Discovery kit B-L475E-IOT1A2

Kscho
Associate II

I have compiled and downloaded the cloud example from package X-CUBE-AWS. I also have an account on AWS and a thing created for my tests (incl. certificates).

When I power up the discovery kit, it is able to connect to the wireless access point and to AWS. I can control the LEDs locally or by issuing the topic from another MQTT publisher. So it seems that everything is working fine. Then I have tried to make a FOTA update wit the FW image uploaded to an S3 bucket on AWS. Here the example has problems when trying to get the first chunk of the FW image from the S3 bucket. It seems to me that it is a configuration problem but I can't find it.

I have added the log received on the terminal. Please cane somebody help me to make the FOTA update working.

4 REPLIES 4
Guillaume K
ST Employee

Hi,

In the log there is HTTP status code 403: you are not authorized to access this ressource.

Check that in the S3 bucket you have configured the .sfb file to be public and accessible by all.

Guillaume.

Kscho
Associate II

Hi Guillaume,

Thanks for your answer. I checked the S3 bucket. The bucket itself and the contained .sfb files are set to public access.

When I download a .sfb file with 'curl -X GET' to my desktop, it works. I have no idea why it does not work from the IoT device.

Best regards,

Kurt

Guillaume K
ST Employee

I had a look again at your log and I see that in the job document the name of the file ends with ".sbf" which is incorrect: B-L475E-IOT01_AWS_1_4_1.sbf

It should end with ".sfb" : B-L475E-IOT01_AWS_1_4_1.sfb

Kscho
Associate II

Hi Guillaume,

I saw the typo in the job file too after analysing the log file more intensive. I corrected it and now FOTA is working as expected.

Thank you for your help. I looked at that log file a hundred times and did not observe the character switch.

Best regards,

Kurt