2024-10-31 12:58 PM
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.
Solved! Go to Solution.
2024-11-01 06:22 AM
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
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-11-01 06:22 AM
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
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-11-01 11:52 AM
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?
2024-11-01 12:27 PM
This will take you too long. I suggest you to follow my answer that i've updated.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-11-06 10:43 AM
Hello, @STTwo-32.
I didn't quite understand what you updated.
I took the BLE_HR_p2p_Sensor.ioc file from the library and created the My_P2P_Server & My_BLE_Sensor services. (I attach the files). After that, I generated the code in a new project. I added the necessary files from the library to this project.
However, the custom_app.c & custom_stm.c files had to be edited manually to avoid compilation errors.
As a result, I got a project working with which Android sees B-WB1M-WPAN1, does not display the heart rate tab, but when selecting sensors and selecting temperature, measurements are not transmitted. The LED does not work either.
I suspect the timer server.
What do you advise me to look at next?
Along the way.
"This application requires having the stm32wb1x_BLE_Stack_full_fw.bin binary flashed on the Wireless Coprocessor. If it is not the case, you need to use STM32CubeProgrammer to load the appropriate binary. All available binaries are located under /Projects/STM32_Copro_Wireless_Binaries directory. Refer to /Projects/STM32_Copro_Wireless_Binaries/Rel easeNote.htmll How to compute available flash size The default linker file is provided in [\Drivers\CMSIS\Device\ST32WBxx\Source\Templates]. The maximum flash memory that can be used by the application is up to the Secure Flash Start Address (SFSA) that can be read from the option byte. (0x08000000 + (SFSA << 11)) - 1 considering minimum CPU secure area size is one sector (2kBytes).
Example: When the SFSA option byte is set to 0x37, the maximum value to be used for __ICFEDIT_region_ROM_end is 0x0801B800 – which is 110kB of flash Note: The SFSA option byte can only be set by the CPU2. The user cannot modify that value."
I did not update the FUS. Should I change file the stm32wb1mxx_flash_cm4.icf libraries?
2024-11-06 05:14 PM
What i suggest you exactly is:
That should do the job.
For the FUS and STACK, it is always recommand to use the last version for sure. So, you need to update your fus and stack.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-11-06 09:44 PM
Hello STTwo-32.
I did exactly what you suggest step by step and attached the files in the last post.
Unfortunately, the project is large enough for me to confidently imagine it entirely semantically. This will come with time.
Please tell me which files still need to be edited. The compiler does not find any errors and I am at a dead end.
Best Regards.
2024-11-26 10:29 AM