2019-04-18 08:36 AM
Using the STM32 Nucleo WB55. Struggling with the OTA examples. None of the three OTA examples seem to work for me. When I program the non-OTA version, the device starts advertising and I can connect to it. But with the OTA version, I see no advertising packets and the power usage shows no network traffic.
2019-04-18 08:47 AM
Note: If I use the st-link utility to program the chip. When I program the BLE_HeartRate_reference.hex file for example, the programming gives me an error but otherwise it appears to work. Device advertises and is connectable.
11:40:36 : [BLE_HeartRate_reference.hex] opened successfully.
11:40:36 : [BLE_HeartRate_reference.hex] checksum : 0x0017AB6D
11:40:37 : Memory programmed in 0s and 532ms.
11:40:37 : Verification...OK
11:40:37 : Programmed memory Checksum: 0x0017AB6D
11:40:38 : Disconnected from device.
11:40:38 : Connection to device is lost: check power supply and debug connection.
11:40:38 : If the target is in low power mode, please enable "Debug in Low Power mode" option from Target->settings menu.
But if programming the BLE_HeartRate_ota_reference.hex, I get no programming error. However device doesn't work.
11:45:06 : ST-LINK SN : 066AFF535456807867071514
11:45:06 : V2J33M25
11:45:06 : Connected via SWD.
11:45:06 : SWD Frequency = 4,0 MHz.
11:45:07 : Connection mode : Connect Under Reset.
11:45:07 : Debug in Low Power mode enabled.
11:45:07 : Device ID:0x495
11:45:07 : Device flash Size : 1MBytes
11:45:07 : Device family :STM32WBxx
11:45:18 : [BLE_HeartRate_ota_reference.bin] opened successfully.
11:45:18 : [BLE_HeartRate_ota_reference.bin] checksum : 0x0017F30A
11:45:21 : Memory programmed in 0s and 532ms.
11:45:21 : Verification...OK
11:45:21 : Programmed memory Checksum: 0x0017F30A
2019-04-18 09:22 AM
I also can't seem to figure out how the STM32CubeProgrammer works.
2019-04-18 11:13 AM
Alright now I'm confused. I built and programmed the BLE_HeartRate_ota example using System Workbench. The last time I did this, I was able to connect to the device using the BLE Sensor app but no download page was found. However this time, one did appear but when I tried to send a binary file it gets stuck scanning and "Node not found". I tried programming the p2p server example. Note after I disconnected from device, I had to reset device before it could be discovered again. After connecting to it the download page was gone. Had to reprogram using System Workbench before download page would reappear. But sending ota behaves as before.
2019-04-18 12:57 PM
Tried building the BLE_p2pServer_ota example using System Workbench. After programming the built image, the device would not advertise and power usage was a solid 7mA. If I reset the device, the unit would start advertising as the BLE_HeartRate example again... Not sure why the programming isn't working.
Next tried building the BLE_Ota example. After programming the built image, the device started advertising as "P2PSRV1" and I could connect using the Sensor app and see notifications when I pressed sw1. However trying to turn on the blue led from the app didn't work, strange. Looking at the source code, I expect the advertising name to be "STM_OTA". So how have I programmed the p2pServer image when I was trying to program the BLE_Ota image? What am I missing?
2019-04-23 02:49 AM
The BLE_Ota is a firmware designed to manage the startup and transfer of the "user" application Over the Air (HeartRate, p2pserver, ...). Both application should be installed on the target.
At boot BLE_OTA is started to check OTA transfer, and then the control is transferred to BLE_p2pServer_ota.
This is why you see the p2pServer advertising after flashing the BLE_Ota.
You should read the document AN5247 (search on st.com), it explains how works the OTA procedure.
2019-05-02 07:55 AM
Thanks that makes a lot more sense. Is there a way to find a list of these app notes for the stm32wb?
I haven't had time to retest the OTA functionality yet.
2019-05-03 06:55 AM
You can find the Application Notes applicable to the STM32WB in the product page : https://www.st.com/en/microcontrollers-microprocessors/stm32wb-series.html#resource
In the "resource" tab, select "Technical Literature" and then "Application Note" .
The first documents are generic A.N., but after you will see the new ones created for STM32WB.
2020-09-17 11:25 PM
Hi. I followed a video on youtube (https://www.youtube.com/watch?v=mRzZOa3jmuM&t=360s) and did few steps, to check whether OTA works on my custom board having STM32WB55CE on it. I did these below steps.
1. Changed my project's start address of FLASH to 0x0800 7000 in STM32WB55CGUX_FLASH.ld file. But could not do anything about those OTA regions and reset characteristics. Magic keyword value was found in app_ble.c.
2. I programmed the BLE_Ota application(took from Nucleo board's example programs folder). It got programmed on my Board. Started advertising also.
3. I could load the BLE_Heartrate_Ota file Over the air successfully. It also worked fine. But OTA upload did not work for my own project. Surely I think due to those ota region and reset characteristics missing.
So, please share how can we add those ota region and reset characteristics into our own projects. I could not do as in the video is shown.
Thanks.