I am using BLE_AT_CLIENT example from STM32CubeIDE 1.7.0 but nothing detected either on ST BLE SENSOR app or on my computer/smartphone normal bluetooth scan. I have 2 B-U585I-IOT02A and both give the exact same error message on teraterm. error message on teraterm
Also here is the log from console.
STMicroelectronics ST-LINK GDB server. Version 5.9.1
Copyright (c) 2021, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 1
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
InitWhile : Enabled
Waiting for debugger connection...
Debugger connected
-------------------------------------------------------------------
STM32CubeProgrammer v2.8.0
-------------------------------------------------------------------
ST-LINK SN : 004000204741500320383733
ST-LINK FW : V3J8M3
Board : B-U585I-IOT02A
Voltage : 3.30V
SWD freq : 24000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x482
Revision ID : Rev Z
Reconnecting with the recommended frequency (1000 kHz)!
ST-LINK SN : 004000204741500320383733
ST-LINK FW : V3J8M3
Board : B-U585I-IOT02A
Voltage : 3.30V
SWD freq : 1000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x482
Revision ID : Rev Z
Reconnected with the recommended frequency (3300 kHz)!
Device name : STM32U575/STM32U585
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M33
BL Version : 0xc0
Debug in Low Power mode enabled
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a11156.srec
File : ST-LINK_GDB_server_a11156.srec
Size : 39248 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 4]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:00.757
Verifying ...
Download verified successfully
Debugger connection lost.
Shutting down...
I just figure out how to solve this, first I have to re-flash the STM32WB5MMG firmware to the latest version and flash the BLE_AT_Server_reference.hex from https://github.com/STMicroelectronics/STM32CubeWB
Don't use BLE_AT_Server.hex from the library binary, it will disable the swd connection, if you happen to do that and can't connect to the board anymore, just change the stm32programmer mode to under reset then press reset button for the bluetooth module and release it, it will let you to connect to the bluetooth module and erase the program.
After that I got another problem that sometimes the program will hang at "TX : AT", to solve this I have to reset the bluetooth module and then reset the main board, or simply reset the main board and re-plug the usb cable.