Skip to main content
Associate III
June 6, 2025
Solved

missing header ble.h

  • June 6, 2025
  • 3 replies
  • 420 views

Hi, in custom_stm.h, should add manually #include "ble.h" to works

Best answer by STTwo-32

Hello @nima.askari 

I've personally generated a code on the STM32WB using the STM32_WPAN and the P2P server application type. After compilation, everything works fine and no need to add the file manually (using the STM32CubeMX V6.14.1 and the STM32CubeIDE V1.18.1). If you have the need to use the ble.h and it is not included, you need to ad it manually.

Best Regards.

STTwo-32

3 replies

Andrew Neil
Super User
June 6, 2025

Are you referring to some specific example?

Please give details.

 

How to write your question to maximize your chances to find a solution 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
STTwo-32
STTwo-32Best answer
Technical Moderator
June 17, 2025

Hello @nima.askari 

I've personally generated a code on the STM32WB using the STM32_WPAN and the P2P server application type. After compilation, everything works fine and no need to add the file manually (using the STM32CubeMX V6.14.1 and the STM32CubeIDE V1.18.1). If you have the need to use the ble.h and it is not included, you need to ad it manually.

Best Regards.

STTwo-32

Associate III
June 18, 2025

hello, After compile yes, but if you use any ble function in main.c, you got error. i used this code: 

 /* USER CODE BEGIN 2 */
 uint32_t ttt = HAL_GetTick();
 uint8_t data[255] = {0};
 /* USER CODE END 2 */

 /* Init code for STM32_WPAN */
 MX_APPE_Init();

 /* Infinite loop */
 /* USER CODE BEGIN WHILE */
 while (1)
 {
 /* USER CODE END WHILE */
 MX_APPE_Process();

 /* USER CODE BEGIN 3 */
 if ((HAL_GetTick() > 5000) && (HAL_GetTick() - ttt >= 10))
 {
 ttt = HAL_GetTick();
 data[0]++;
 Custom_STM_App_Update_Char(CUSTOM_STM_DATA_AQU, data);

 }
 }
 /* USER CODE END 3 */

 

STTwo-32
Technical Moderator
June 27, 2025

Hello @nima.askari 

If you are going to add a function. It may require adding new files to your project to make it work.

Best Regards.

STTwo-32