2022-05-25 07:23 AM
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.
2022-05-27 06:41 AM
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
2022-05-27 06:50 AM
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.
2022-06-01 06:04 AM
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
2022-06-06 09:17 AM
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
2022-06-06 09:29 AM
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.
2022-06-07 01:05 AM
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:
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