Skip to main content
Associate II
March 6, 2025
Solved

BLE Project with Personalized Services (Central device)

  • March 6, 2025
  • 1 reply
  • 1099 views

Hi,
I'm currently working on a project using multiple B-WB1M-WPAN devices:

  • one acts as BLE Central;
  • the others act as BLE Peripherals.

I'm using the STM32_WPAN software package in CubeMX 6.14.

My question is: how do I create a Central that is able to interact with Custom services and Characteristics defined on my peripherals?

I've already started using the Server profile "Custom Template" on the Peripheral devices; for the Central (Client profile), CubeMX forces me to use the "Custom P2P Client", and both CubeMX and the code don't allow for a great deal of customization.

Thank you!

Best answer by STTwo-32

Hello @cvlt 

For the first point, if you are looking for a pure central application, you may want to have a look at the BLE_p2pClient application. If you use the Client or router profile from CubeMX, you will be forced to start from the Custom P2P Client/Router. So, if you don't want to start form the Custom Templates, you should start a project directly without CubeMX.

Best Regards.

STTwo-32

 

 

1 reply

Technical Moderator
March 7, 2025

Hi,
You can have a look at the p2pRouter example:
STM32CubeWB/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_p2pRouteur at master · STMicroelectronics/STM32CubeWB
This example was done with the Nucleo WB5 but you can check how his MX .ioc project is configured.

BR, Joé

cvltAuthor
Associate II
March 7, 2025

Hi Joe,

thank you very much for your rapid response.

The Example you pointed out is very useful and instructive, and it will surely help us in the future.

On this particular project though, it forces us to keep or use some features that we don't want:

  • It forces the "Router" device to both be a Peripheral and a Central (this could surely be helpful, but for the current project we want a pure central)
  • It forces us to use the Custom P2P Router service

We don't want to renounce using CubeMX to regenerate the code in the future (without breaking/removing what we implemented), nor to introduce weird workarounds to avoid using the Custom P2P template that is forced in the sample. 

So, is there any way we can satisfy our necessities?

STTwo-32
STTwo-32Best answer
Technical Moderator
March 26, 2025

Hello @cvlt 

For the first point, if you are looking for a pure central application, you may want to have a look at the BLE_p2pClient application. If you use the Client or router profile from CubeMX, you will be forced to start from the Custom P2P Client/Router. So, if you don't want to start form the Custom Templates, you should start a project directly without CubeMX.

Best Regards.

STTwo-32