Skip to main content
Associate III
October 31, 2024
Solved

B-WB1M-WPAN1

  • October 31, 2024
  • 1 reply
  • 2925 views

Colleagues, I have a task to accept settings and transmit measurements to the smartphone screen via USART1. The Android application is handled by a third-party company. I suspect that the task is not new, but I will have to solve it myself.
For this, I want to modify the BLE_HR_p2p_Sensor project.
I need to start with something small...

For example, is it possible to disable the "heart rate" task through the BLE_HR_p2p_Sensor application defines.
If not, I would appreciate any advice on how to painlessly disable any sensor.

Best answer by STTwo-32

Hello @pm_interrupt_vect 

To avoid any configuration problems on your code, I suggest you have a new project based on exactly the same configuration. But will creating the services you can create only the services you are looking for. 

Best Regards.

STTwo-32

1 reply

STTwo-32
STTwo-32Best answer
Technical Moderator
November 1, 2024

Hello @pm_interrupt_vect 

To avoid any configuration problems on your code, I suggest you have a new project based on exactly the same configuration. But will creating the services you can create only the services you are looking for. 

Best Regards.

STTwo-32

Associate III
November 1, 2024

Hello, @STTwo-32.
The BLE GATT tab does not allow me to directly manipulate the enabling and disabling of services. However, I can change their number. Moreover, if I first reduce it to one, and then increase it to three, then CubeMX restores the default services.
However, if I copy the names My_BLE_Sensor to the place of the names My_Heart_Rate, we get three services, the last two of which are My_BLE_Sensor. Then I reduce the number of services to two. After that, when I increase the number back to three (which I do not need to do now), CubeMX prompts me to enter the name of the new service, and My_Heart_Rate is lost.
After that, I need to generate code that will no longer have the My_Heart_Rate service.

Did I get it all right?

STTwo-32
Technical Moderator
November 1, 2024

This will take you too long. I suggest you to follow my answer that i've updated.

Best Regards.

STTwo-32