Skip to main content
SCARAMO
Associate
March 8, 2022
Question

STM32WB BLE OTA Losing Connection during Firmware update

  • March 8, 2022
  • 2 replies
  • 1754 views

Dear Community,

I'm using a P-NUCLEO-WB55 Board and Dongle, until now only with ST examples.

I'm trying to perform firmware update using BLE OTA (switching from BLE_HeartRate_ota to BLE_p2pServer_ota for example) and am facing a problem.

The same problem appears if I Use STM32 CUBE Monitor-RF on PC with P-NUCLEO Dongle or using STM BLE Sensor App on Android smartphone.

Here is my issue:

I can find my device and start an OTA update.

Flashing starts and very frequently, it suddenly stops, like if connection was lost.

I checked, I have a stable power supply.

Could you please give me any hint on how to proceed for debugging?

Thanks and best regards

This topic has been closed for replies.

2 replies

Remy ISSALYS
Technical Moderator
March 9, 2022

Hello,

First check if you have the latest firmware version on your board:

  • FUS v1.2.0
  • BLE Stack (stm32wb5x_BLE_Stack_full_fw.bin) v1.13.0

If you need to update your firmware download the latest release (available here https://www.st.com/en/embedded-software/stm32cubewb.html) and follow the instruction of this wiki page:

https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WB_BLE_Hardware_Setup#FUS_and_wireless_stack_update

Then flash your board with BLE_Ota_reference.hex available in STM32Cube_FW_WB_V1.13.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\BLE\BLE_Ota\Binary.

Download on your smartphone BLE_HeartRate_ota_reference.bin and BLE_p2pServer_ota_reference.bin files.

Take your smartphone with ST BLE Sensor application:

  • Click on Connect one Device
  • Connect to your device STM_OTA
  • Once connection is established select BLE_HeartRate_ota_reference.bin for example by clicking on select file
  • Click on bottom left button
  • Pop up appears when upload is completed
  • Then connect to your new application HRSTM

More informations about OTA process is available in AN5247.

Best Regards

SCARAMO
SCARAMOAuthor
Associate
March 10, 2022

Dear Remy,

Thank you for your quick reply.

I was working with FUS v1.2.0 and BLE Stack v1.12.1, so I tried to update to the last available revision v1.13.1, but the described problem remains and another appears.

Again, I'm working with ST Hardware, and ST binary files.

In addition, I have 2 P-Nucleo Boards and 3 dongles... what I describe here appears with whatever of them I use.

With v1.12.1, firmware update using Cube RF and Nucleo Dongle:

a) BLE_OTA            -> BLE_HeartRate_ota   : OK, no problems

b) BLE_HeartRate_ota  -> BLE_P2PServer_ota   : OK, no problems

c) BLE_P2PServer_ota  -> BLE_HeartRate_ota   : Error, gets stuck while flashing

With v1.13.1 :

a) Using Cube RF and Nucleo Dongle I'm even not able to detect the P-Nucleo Board anymore...

b) Using Android MobilePhone and ST Sensor App I detect the P-Nucleo Board

c) and start flashing. But again, there is an error, the app gets stuck while flashing

d) And finally I lost my P-Nucleo board... ST-Link tells me there is no device on target...

e) I tried to connect to the P-Nucleo boards with USB, but no FSU is detected.

So, I'm now unable to connect to my P-Nucleo Boards and really don't know how to come out of this.

Thank you in advance for your support,

Best Regards

SCARAMO
SCARAMOAuthor
Associate
April 21, 2022

Follow up from my last post:

I managed to reconnect my P-Nucleo Board, thaks to this post:

https://electronics.stackexchange.com/questions/204996/stm32-st-link-cannot-connect-to-mcu-after-successful-programming

Howto:

  • Open STM32 Cube programmer
  • Select ST-Link connection, refresh le st-link serial number
  • Connect the P-Nucleo Board to the PC
  • Click and hold the reset button of the P-Nucleo board
  • Release the button and immediately click on "connect" in the STM32 Cube programmer
  • The STM32 Cube programmer should now finally be able to reconnect to the P-Nucleo Board.
  • Perform a full chip flash memory erase, so that the code that creates the problem is removed.

Hope it helps