cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure BLE from STM32U5 MCU pinout (IOC file)?

juyec
Associate II

Hello!

The title pretty much says it all - I'm trying to figure out how to configure BLE between two B-U585I-IOT02A boards, but establishing the BLE connection is a bit confusing to me. Am I able to configure it from the UFBGA169 IOC file in STM32CubeMX, or is there another way to do that?

I'm also struggling with communicating between the STM32U5 chip and the STM32WB5M module on the B-U585I-IOT02A board - I found a document on the ST Wiki that says these two chips can communicate over LPUART, but I'm not entirely sure if there's any additional configuration I'd need to do.

I apologize if these questions are super simple - I'm still a bit new to the STM32 ecosystem, and I've gotten lost between all the documentation available.

Thank you,

Jake U.

6 REPLIES 6
Mohamed Aymen HZAMI
ST Employee

Hello @juyec​ and welcome to the community,

At first you can start have a look at the example under this path:

STM32Cube\Repository\STM32Cube_FW_U5_V1.1.0\Projects\B-U585I-IOT02A\Applications\BLE\BLE_AT_Client

To make this example work, you need to read carefully the readMe file under the same path

Mohamed Aymen

juyec
Associate II

Hello @Mohamed Aymen HZAMI​ ! Thank you for the response!

I've looked over the project and the readme, but I was hoping to get two boards to communicate with each other (instead of a smartphone to board). I'm assuming this would be harder since there's no GUI to pair the devices, so it would need to be done in the code. Something similar to the BLE_CableReplacement project in the STM32WB firmware package, but through the B-U585I-IOT02A boards instead.

Does the STM32WB module on the B-U585I-IOT02A come with the FUS and BLE stack already flashed (factory default), or would I still need to flash these binaries with the instructions listed in the readme?

I apologize again if I'm not understanding this properly - thank you for bearing with me!

Jake U.

Remy ISSALYS
ST Employee

Hello,

On B-U585I-IOT02A board, the STM32U5 chip communicate to the STM32WB5M module over LPUART. According to the user manual (UM2839), the STM32WB5MM module is shipped with the BLE_MultiAppAt application into it, so the FUS and BLE stack is already flashed also. The BLE_MultiAppAt application is available in STM32CubeWB package. So, for STM32WB5MM module you have nothing to do.

For STM32U5, you should use BLE_AT_Client example available in STM32CubeU5 package.

In order to get two boards which communicate with each other, you have to modify BLE_AT_Client to send command to STM32WB5M module over LPUART to configure one board in AT P2P Server and the other in AT P2P Client (see readme of BLE_MultiAppAt).

You can find many information about AT commands on the following wiki page:

https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WB_AT_Server

Best Regards

Remy ISSALYS
ST Employee

Hello,

I made a mistake BLE_MultiAppAt isn't compatible with BLE_AT_Client example. So, in order to use BLE_AT_Client on STM32U5, you should used BLE_AT_Server application for STM32WB5MM module.

So, to get two boards which communicate with each other, you have to implement the AT P2P Client part, BLE_AT_Server allows to configure only the P2P Server side.

Best Regards

juyec
Associate II

Hello!

Thank you for the update! Would the setup be something like flashing the WB module on one board with the AT_Server application and flashing the WB module on the other board with a custom implementation of a client application? If that is the case, is there any sort of template or base code I could use as a starting point? I apologize if I'm asking too many questions - thank you for your patience!

Thank you again!

Jake U.

Remy ISSALYS
ST Employee

Hello,

Yes, it's right, one board with a server application in WB module and the other board with a custom client application in WB module. You can look the following examples available in STM32CubeWB package:

  • BLE_CableReplacement
  • BLE_MultiAppAt
  • BLE_p2pClient / BLE_p2pServer

You can start with one of these examples, be careful with of button and led configuration not available on your board see the defines in app_conf.h file:

#define CFG_LED_SUPPORTED         0
#define CFG_BUTTON_SUPPORTED      0

And add LPUART communication in order to send command from STM32U5.

Best Regards